]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
i386: Allow GOT32 relocations against ABS symbols
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 7 Feb 2022 23:22:19 +0000 (15:22 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 8 Feb 2022 00:04:10 +0000 (16:04 -0800)
commit30a954525f4e53a9cd50a1a8a6f201c7cf6595c7
treef801035fdda0bbcbb2cf4037a1faa7e655848a8f
parenta194bde6705579ac3e767db48e0966a7f6144431
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.
bfd/elfxx-x86.c
ld/testsuite/ld-i386/i386.exp
ld/testsuite/ld-i386/pr28870.d [new file with mode: 0644]
ld/testsuite/ld-i386/pr28870.s [new file with mode: 0644]