binutils-gdb/ld/testsuite/ld-i386/pr28870.d
H.J. Lu 30a954525f i386: Allow GOT32 relocations against ABS symbols
GOT32 relocations are allowed since absolute value + addend is stored in
the GOT slot.

Tested on glibc 2.35 build with GCC 11.2 and -Os.

bfd/

	PR ld/28870
	* elfxx-x86.c (_bfd_elf_x86_valid_reloc_p): Also allow GOT32
	relocations.

ld/

	PR ld/28870
	* testsuite/ld-i386/i386.exp: Run pr28870.
	* testsuite/ld-i386/pr28870.d: New file.
	* testsuite/ld-i386/pr28870.s: Likewise.
2022-02-07 16:04:10 -08:00

11 lines
253 B
Makefile

#as: --32
#ld: --no-dynamic-linker -m elf_i386 -pie
#readelf: -s --wide
#...
Symbol table '.symtab' contains [0-9]+ entries:
Num: Value Size Type Bind Vis Ndx Name
#...
+[a-f0-9]+: 00000002 0 NOTYPE LOCAL DEFAULT ABS foo
#pass