glibc/sysdeps/i386
H.J. Lu 1864775abc x86: Check IFUNC definition in unrelocated executable [BZ #20019]
Calling an IFUNC function defined in unrelocated executable also leads to
segfault.  Issue a fatal error message when calling IFUNC function defined
in the unrelocated executable from a shared library.

On x86, ifuncmain6pie failed with:

[hjl@gnu-cfl-2 build-i686-linux]$ ./elf/ifuncmain6pie --direct
./elf/ifuncmain6pie: IFUNC symbol 'foo' referenced in '/export/build/gnu/tools-build/glibc-32bit/build-i686-linux/elf/ifuncmod6.so' is defined in the executable and creates an unsatisfiable circular dependency.
[hjl@gnu-cfl-2 build-i686-linux]$ readelf -rW elf/ifuncmod6.so | grep foo
00003ff4  00000706 R_386_GLOB_DAT         0000400c   foo_ptr
00003ff8  00000406 R_386_GLOB_DAT         00000000   foo
0000400c  00000401 R_386_32               00000000   foo
[hjl@gnu-cfl-2 build-i686-linux]$

Remove non-JUMP_SLOT relocations against foo in ifuncmod6.so, which
trigger the circular IFUNC dependency, and build ifuncmain6pie with
-Wl,-z,lazy.

(cherry picked from commits 6ea5b57afa5cdc9ce367d2b69a2cebfb273e4617
 and 7137d682ebfcb6db5dfc5f39724718699922f06c)
2021-01-13 14:30:42 -08:00
..
fpu Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
htl Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
i586 Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
i686 Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
i786 Also applying directories. 1999-01-24 10:39:22 +00:00
nptl i386: Remove bogus THREAD_ATOMIC_* macros 2019-01-03 18:38:15 -02:00
sys Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
Implies Add float128 support for x86_64, x86. 2017-06-26 22:02:24 +00:00
Makefile math: Set 387 and SSE2 rounding mode for tgamma on i386 [BZ #23253] 2018-06-21 08:04:29 +02:00
Versions Move __fentry__ version definition to sysdeps/{i386,x86_64} 2018-08-10 09:07:44 +02:00
____longjmp_chk.S Add sigstack handling to Linux ____longjmp_chk on i386. 2009-07-30 21:50:14 -07:00
__longjmp.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
abort-instr.h update from main archive 961220 1996-12-21 04:13:58 +00:00
add_n.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
addmul_1.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
asm-syntax.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
backtrace.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
bcopy.S Add i386 memset and memcpy assembly functions 2015-08-27 09:04:54 -07:00
bsd-_setjmp.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
bsd-setjmp.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
bzero.S Add i386 memset and memcpy assembly functions 2015-08-27 09:04:54 -07:00
cacheinfo.c Move sysdeps/x86_64/cacheinfo.c to sysdeps/x86 2016-05-08 08:49:18 -07:00
configure Add --enable-static-pie configure option to build static PIE [BZ #19574] 2017-12-15 17:12:14 -08:00
configure.ac Add --enable-static-pie configure option to build static PIE [BZ #19574] 2017-12-15 17:12:14 -08:00
crti.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
crtn.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
dl-irel.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
dl-lookupcfg.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
dl-machine.h x86: Check IFUNC definition in unrelocated executable [BZ #20019] 2021-01-13 14:30:42 -08:00
dl-procinfo.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
dl-tls.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
dl-tlsdesc.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
dl-tlsdesc.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
dl-trampoline.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
ffs.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
gccframe.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
gmp-mparam.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
htonl.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
htons.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
i386-mcount.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
isa.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
jmpbuf-offsets.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
jmpbuf-unwind.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
ldbl2mpn.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
link-defines.sym Preserve bound registers for pointer pass/return 2015-07-09 06:50:12 -07:00
lshift.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
machine-gmon.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
malloc-alignment.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
memchr.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
memcmp.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
memcopy.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
memcpy.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
memcpy_chk.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
memmove.S Add i386 memset and memcpy assembly functions 2015-08-27 09:04:54 -07:00
memmove_chk.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
mempcpy.S Add i386 memset and memcpy assembly functions 2015-08-27 09:04:54 -07:00
mempcpy_chk.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
memset.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
memset_chk.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
memusage.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
mp_clz_tab.c Update. 2002-03-14 20:48:50 +00:00
mul_1.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
preconfigure Move base_machine and machine settings from configure.ac to sysdeps preconfigure fragments. 2014-06-25 17:52:56 +00:00
pthread_spin_trylock.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
rawmemchr.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
rshift.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
setfpucw.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
setjmp.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
stackguard-macros.h BZ #15754: CVE-2013-4788 2013-09-23 00:52:09 -04:00
stackinfo.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
start.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
stpcpy.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
stpncpy.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
strcat.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
strchr.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
strchrnul.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
strcspn.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
string-inlines.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
strlen.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
strlen.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
strpbrk.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
strrchr.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
strspn.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
sub_n.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
submul_1.S Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
symbol-hacks.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
sysdep.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
tls-macros.h i386: Fix build by GCC 5.0 2014-12-30 11:37:41 -08:00
tlsdesc.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
tlsdesc.sym Introduce TLS descriptors for i386 and x86_64. 2008-05-13 05:41:30 +00:00
tst-audit.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
tst-audit3.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
tst-audit3.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
tst-auditmod3a.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
tst-auditmod3b.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
tst-ld-sse-use.sh Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
tst-stack-align.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00