glibc/sysdeps
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 6ea5b57afa
 and 7137d682eb)
2021-01-13 14:30:42 -08:00
..
aarch64 aarch64: Fix DT_AARCH64_VARIANT_PCS handling [BZ #26798] 2020-11-04 12:26:02 +00:00
alpha Update Alpha libm-test-ulps 2019-09-03 21:43:22 +02:00
arm arm: Use "nr" constraint for Systemtap probes [BZ #24164] 2019-02-05 13:49:03 +01:00
csky Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
generic posix: Fix large mmap64 offset for mips64n32 (BZ#24699) 2019-07-15 09:26:39 -03:00
gnu Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
hppa hppa: Update libm-tests-ulps 2019-08-18 11:38:26 +02:00
htl hurd: advertise *_setpshared as not supported 2019-01-02 22:21:34 +01:00
hurd Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
i386 x86: Check IFUNC definition in unrelocated executable [BZ #20019] 2021-01-13 14:30:42 -08:00
ia64 Fix a few typos in comments 2019-01-12 13:44:51 +00:00
ieee754 math/test-sinl-pseudo: Use stack protector only if available 2020-03-15 17:33:57 -04:00
init_array Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
m68k Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
mach hurd: Check at_flags passed to faccessat 2019-01-22 22:47:10 +01:00
microblaze Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
mips Update MIPS libm-test-ulps. 2019-01-02 17:25:33 +00:00
nios2 Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
nptl nptl: Avoid fork handler lock for async-signal-safe fork [BZ #24161] 2019-02-08 12:54:41 +01:00
posix CVE-2016-10739: getaddrinfo: Fully parse IPv4 address strings [BZ #20018] 2019-01-21 21:26:03 +01:00
powerpc Fix array overflow in backtrace on PowerPC (bug 25423) 2020-03-18 13:41:55 -04:00
pthread Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
riscv RISC-V: Update nofpu ULPs 2019-01-24 13:55:05 -05:00
s390 S390: Mark vx and vxe as important hwcap. 2019-03-21 09:27:37 +01:00
sh Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
sparc Fix output of LD_SHOW_AUXV=1. 2019-03-13 10:51:23 +01:00
unix AArch64: Use __memcpy_simd on Neoverse N2/V1 2020-10-14 14:31:24 +01:00
wordsize-32 Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
wordsize-64 Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
x86 x86: Set header.feature_1 in TCB for always-on CET [BZ #27177] 2021-01-13 09:24:35 -08:00
x86_64 x86: Check IFUNC definition in unrelocated executable [BZ #20019] 2021-01-13 14:30:42 -08:00