diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2014-11-07 12:22:53 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2014-11-07 12:22:53 -0800 |
commit | cf61b7473a8ee3b43c4f8f2776075ec8d81d7495 (patch) | |
tree | 0aeca9ef993f4b362aaa7649228120a4302c5532 /ld | |
parent | 9de00a4aa026297eae42bafd8ab413cfc1a53e3a (diff) | |
download | gdb-cf61b7473a8ee3b43c4f8f2776075ec8d81d7495.zip gdb-cf61b7473a8ee3b43c4f8f2776075ec8d81d7495.tar.gz gdb-cf61b7473a8ee3b43c4f8f2776075ec8d81d7495.tar.bz2 |
X32: Add REX prefix to encode R_X86_64_GOTTPOFF
Structions with R_X86_64_GOTTPOFF relocation must be encoded with REX
prefix even if it isn't required by destination register. Otherwise
linker can't safely perform IE -> LE optimization.
bfd/
PR ld/17482
* elf64-x86-64.c (elf_x86_64_relocate_section): Update comments
for IE->LE transition.
gas/
PR ld/17482
* config/tc-i386.c (output_insn): Add a dummy REX_OPCODE prefix
for structions with R_X86_64_GOTTPOFF relocation for x32 if needed.
gas/testsuite/
PR ld/17482
* gas/i386/ilp32/x32-tls.d: New file.
* gas/i386/ilp32/x32-tls.s: Likewise.
ld/testsuite/
PR ld/17482
* ld-x86-64/tlsie4.dd: Updated.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/tlsie4.dd | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index ce0bc74..4a03660 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-11-07 H.J. Lu <hongjiu.lu@intel.com> + + PR ld/17482 + * ld-x86-64/tlsie4.dd: Updated. + 2014-11-05 Matthew Fortune <matthew.fortune@imgtec.com> * ld-mips-elf/abiflags-strip10-ph.d: New file. diff --git a/ld/testsuite/ld-x86-64/tlsie4.dd b/ld/testsuite/ld-x86-64/tlsie4.dd index d52e337..e40b917 100644 --- a/ld/testsuite/ld-x86-64/tlsie4.dd +++ b/ld/testsuite/ld-x86-64/tlsie4.dd @@ -9,8 +9,8 @@ Disassembly of section .text: [a-f0-9]+ <_start>: -[ ]*[a-f0-9]+: c7 c0 fc ff ff ff mov \$0xfffffffc,%eax -[ ]*[a-f0-9]+: 8d 80 fc ff ff ff lea -0x4\(%rax\),%eax +[ ]*[a-f0-9]+: 40 c7 c0 fc ff ff ff rex mov \$0xfffffffc,%eax +[ ]*[a-f0-9]+: 40 8d 80 fc ff ff ff rex lea -0x4\(%rax\),%eax [ ]*[a-f0-9]+: 41 c7 c0 fc ff ff ff mov \$0xfffffffc,%r8d [ ]*[a-f0-9]+: 45 8d 80 fc ff ff ff lea -0x4\(%r8\),%r8d [ ]*[a-f0-9]+: 41 c7 c4 fc ff ff ff mov \$0xfffffffc,%r12d |