mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-27 03:41:23 +08:00
0f09154c64
X86 CPU features in ld.so are initialized by init_cpu_features, which is invoked by DL_PLATFORM_INIT from _dl_sysdep_start. But when ld.so is loaded by static executable, DL_PLATFORM_INIT is never called. Also x86 cache info in libc.o and libc.a is initialized by a constructor which may be called too late. Since some fields in _rtld_global_ro in ld.so are initialized by dynamic relocation, we can also initialize x86 CPU features in _rtld_global_ro in ld.so and cache info in libc.so by initializing dummy function pointers in ld.so and libc.so via IFUNC relocation. Key points: 1. IFUNC is always supported, independent of --enable-multi-arch or --disable-multi-arch. Linker generates IFUNC relocations from input IFUNC objects and ld.so performs IFUNC relocations. 2. There are no IFUNC dependencies in ld.so before dynamic relocation have been performed, 3. The x86 CPU features in ld.so is initialized by DL_PLATFORM_INIT in dynamic executable and by IFUNC relocation in dlopen in static executable. 4. The x86 cache info in libc.o is initialized by IFUNC relocation. 5. In libc.a, both x86 CPU features and cache info are initialized from ARCH_INIT_CPU_FEATURES, not by IFUNC relocation, before __libc_early_init is called. Note: _dl_x86_init_cpu_features can be called more than once from DL_PLATFORM_INIT and during relocation in ld.so. |
||
---|---|---|
.. | ||
fpu | ||
htl | ||
i586 | ||
i686 | ||
i786 | ||
nptl | ||
sys | ||
____longjmp_chk.S | ||
__longjmp.S | ||
abort-instr.h | ||
add_n.S | ||
addmul_1.S | ||
asm-syntax.h | ||
backtrace.c | ||
bcopy.S | ||
bsd-_setjmp.S | ||
bsd-setjmp.S | ||
bzero.S | ||
configure | ||
configure.ac | ||
crti.S | ||
crtn.S | ||
dl-irel.h | ||
dl-machine.h | ||
dl-procinfo.c | ||
dl-tls.h | ||
dl-tlsdesc.h | ||
dl-tlsdesc.S | ||
dl-trampoline.S | ||
ffs.c | ||
gccframe.h | ||
htonl.S | ||
htons.S | ||
i386-mcount.S | ||
Implies | ||
isa.h | ||
jmpbuf-offsets.h | ||
jmpbuf-unwind.h | ||
link-defines.sym | ||
lshift.S | ||
machine-gmon.h | ||
Makefile | ||
malloc-alignment.h | ||
memchr.S | ||
memcmp.S | ||
memcopy.h | ||
memcpy_chk.S | ||
memcpy.S | ||
memmove_chk.S | ||
memmove.S | ||
mempcpy_chk.S | ||
mempcpy.S | ||
memset_chk.S | ||
memset.S | ||
memusage.h | ||
mp_clz_tab.c | ||
mul_1.S | ||
preconfigure | ||
pthread_spin_trylock.S | ||
rawmemchr.S | ||
rshift.S | ||
setfpucw.c | ||
setjmp.S | ||
stackguard-macros.h | ||
stackinfo.h | ||
start.S | ||
stpcpy.S | ||
stpncpy.S | ||
strcat.S | ||
strchr.S | ||
strchrnul.S | ||
strcspn.S | ||
string-inlines.c | ||
strlen.c | ||
strlen.S | ||
strpbrk.S | ||
strrchr.S | ||
strspn.S | ||
sub_n.S | ||
submul_1.S | ||
symbol-hacks.h | ||
sysdep.h | ||
tls-macros.h | ||
tlsdesc.c | ||
tlsdesc.sym | ||
tst-audit3.c | ||
tst-audit3.h | ||
tst-audit.h | ||
tst-auditmod3a.c | ||
tst-auditmod3b.c | ||
tst-ld-sse-use.sh | ||
tst-stack-align.h | ||
Versions |