i386: Allow "lea foo@GOT, %reg" in PIC
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 15 Feb 2017 19:39:30 +0000 (11:39 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 15 Feb 2017 19:39:48 +0000 (11:39 -0800)
commit2a5684011edabf5804abb9e11253a9747587b284
tree8ed51e47a385a573a949b36a10451b8fd89ef080
parenta5def14f1ca70e14d9433cb229c9369fa3051598
i386: Allow "lea foo@GOT, %reg" in PIC

"lea foo@GOT, %reg" is OK in PIC since it only loads the GOT offset
into register, which can be used later with a GOT base register to
get the value in the GOT entry.

bfd/

PR ld/21168
* elf32-i386.c (elf_i386_relocate_section): Allow
"lea foo@GOT, %reg" in PIC.

ld/

PR ld/21168
* testsuite/ld-i386/i386.exp: Run pr21168.
* testsuite/ld-i386/pr21168a.c: New file.
* testsuite/ld-i386/pr21168b.S: Likewise.
bfd/ChangeLog
bfd/elf32-i386.c
ld/ChangeLog
ld/testsuite/ld-i386/i386.exp
ld/testsuite/ld-i386/pr21168a.c [new file with mode: 0644]
ld/testsuite/ld-i386/pr21168b.S [new file with mode: 0644]
This page took 0.026351 seconds and 4 git commands to generate.