mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 12:30:06 +00:00
47618209d0
Extern symbol access in position independent code usually involves GOT indirection which needs RELATIVE reloc in a static linked PIE. (On some targets this is avoided e.g. because the linker can relax a GOT access to a pc-relative access, but this is not generally true.) Code that runs before static PIE self relocation must avoid relying on dynamic relocations which can be ensured by using hidden visibility. However we cannot just make all symbols hidden: On i386, all calls to IFUNC functions must go through PLT and calls to hidden functions CANNOT go through PLT in PIE since EBX used in PIE PLT may not be set up for local calls to hidden IFUNC functions. This patch aims to make symbol references hidden in code that is used before and by _dl_relocate_static_pie when building a static PIE libc. Note: for an object that is used in the startup code, its references and definition may not have consistent visibility: it is only forced hidden in the startup code. This is needed for fixing bug 27072. Co-authored-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> |
||
---|---|---|
.. | ||
abi-note.c | ||
check_fds.c | ||
dso_handle.c | ||
elf-init.c | ||
errno-loc.c | ||
errno.c | ||
gmon-start.c | ||
init-first.c | ||
init.c | ||
libc-start.c | ||
libc-tls.c | ||
Makefile | ||
start.c | ||
static-reloc.c | ||
sysdep.c | ||
version.c | ||
Versions |