#
9684658e |
| 19-Oct-2024 |
Jessica Clarke <jrtc27@FreeBSD.org> |
libc/csu: Unify INIT_RELOCS across architectures
Some architectures don't need any arguments, whilst others need auxargs, which they get by passing in env thanks to INIT_RELOCS referencing the local
libc/csu: Unify INIT_RELOCS across architectures
Some architectures don't need any arguments, whilst others need auxargs, which they get by passing in env thanks to INIT_RELOCS referencing the local variable in __libc_start1(_gcrt) by name. This is unnecessarily confusing, fragile (one has to look at INIT_IRELOCS's definition to see that it uses env) and duplicates code between architectures.
Instead, implement it more like rtld-elf. Each architecture provides an ifunc_init that takes the auxargs directly, and those that don't need it can just ignore it.
Reviewed by: kib MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D47188
show more ...
|
Revision tags: release/13.4.0, release/14.1.0, release/13.3.0, release/14.0.0 |
|
#
559a218c |
| 01-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
libc: Purge unneeded cdefs.h
These sys/cdefs.h are not needed. Purge them. They are mostly left-over from the $FreeBSD$ removal. A few in libc are still required for macros that cdefs.h defines. Kee
libc: Purge unneeded cdefs.h
These sys/cdefs.h are not needed. Purge them. They are mostly left-over from the $FreeBSD$ removal. A few in libc are still required for macros that cdefs.h defines. Keep those.
Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D42385
show more ...
|
#
1d386b48 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
Revision tags: release/13.2.0, release/12.4.0 |
|
#
03039385 |
| 01-Nov-2022 |
Konstantin Belousov <kib@FreeBSD.org> |
x86: microoptimize static PIE startup
Do not call CPUID on each ireloc, instead call it once and cache results, similar to how it is done on powerpc64.
Reviewed by: markj Sponsored by: The FreeBSD
x86: microoptimize static PIE startup
Do not call CPUID on each ireloc, instead call it once and cache results, similar to how it is done on powerpc64.
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 3 weeks Differential revision: https://reviews.freebsd.org/D37220
show more ...
|
#
51015e6d |
| 31-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 upd
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
show more ...
|