History log of /freebsd-current/lib/libc/csu/Makefile.inc
Revision Date Author Comments
# c5c9d980 11-Mar-2023 Konstantin Belousov <kib@FreeBSD.org>

libc/csu: rename ignore_init.c to libc_start1.c

The current name was a historical curiosity that started when init array
support was added, and then the file appeared a convenient place for the
addition of the MI common code to csu. It is now referenced by name in
single place and the rename is easy, so do it.

Sponsored by: The FreeBSD Foundation
MFC after: 3 weeks


# 51015e6d 30-Oct-2022 Konstantin Belousov <kib@FreeBSD.org>

csu: move common code to libc

Why? Most trivial point, it shaves around 600 bytes from the dynamic
binaries on amd64. Less trivial, the removed code is no longer part of
the ABI, and we can ship updates to it with libc updates. Right now most
of the csu is linked into the binaries and require us to do somewhat
tricky ABI compat when it needs to change. For instance, the init_array
change would be much simpler and does not require note tagging if we
have init calling code in libc.

This could be improved more, by splitting dynamic and static
initialization. For instance, &_DYNAMIC tests can be removed then.
Such change, nonetheless, would require building libc three times.
I left this for later, after this change stabilizes, if ever.

Reviewed by: markj
Discussed with: jrtc27 (some objections, see the review), imp
Tested by: markj (aarch64)
Sponsored by: The FreeBSD Foundation
MFC after: 3 weeks
Differential revision: https://reviews.freebsd.org/D37220