Summary: | -melf32_x86_64 IE->LE transition error | ||
---|---|---|---|
Product: | binutils | Reporter: | Alan Modra <amodra> |
Component: | ld | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | hjl.tools, markus |
Priority: | P2 | ||
Version: | 2.25 | ||
Target Milestone: | 2.25 | ||
Host: | Target: | x86_64-linux | |
Build: | Last reconfirmed: | ||
Attachments: | A patch |
Description
Alan Modra
2014-10-14 01:35:05 UTC
I couldn't find a good solution for this. I am leaning toward to encode instructions with gottpoff relocation with a dummy REX prefix (0x40) if there is no REX prefix. Created attachment 7832 [details]
A patch
This is the patch I am testing. But I may not have time
to check it in for the next couple weeks. Please feel
free to commit it for me if it is OK. Thanks.
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "gdb and binutils". The branch, master has been updated via cf61b7473a8ee3b43c4f8f2776075ec8d81d7495 (commit) from 9de00a4aa026297eae42bafd8ab413cfc1a53e3a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=cf61b7473a8ee3b43c4f8f2776075ec8d81d7495 commit cf61b7473a8ee3b43c4f8f2776075ec8d81d7495 Author: H.J. Lu <hjl.tools@gmail.com> Date: Fri Nov 7 12:22:53 2014 -0800 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. ----------------------------------------------------------------------- Summary of changes: bfd/ChangeLog | 6 ++++++ bfd/elf64-x86-64.c | 22 ++++++++++++++++------ gas/ChangeLog | 6 ++++++ gas/config/tc-i386.c | 9 +++++++++ gas/testsuite/ChangeLog | 6 ++++++ gas/testsuite/gas/i386/ilp32/x32-tls.d | 13 +++++++++++++ gas/testsuite/gas/i386/ilp32/x32-tls.s | 13 +++++++++++++ ld/testsuite/ChangeLog | 5 +++++ ld/testsuite/ld-x86-64/tlsie4.dd | 4 ++-- 9 files changed, 76 insertions(+), 8 deletions(-) create mode 100644 gas/testsuite/gas/i386/ilp32/x32-tls.d create mode 100644 gas/testsuite/gas/i386/ilp32/x32-tls.s This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "gdb and binutils". The branch, binutils-2_25-branch has been updated via cf115d606eea814d659588953cbaa5b0b16e234c (commit) from 35cd712bccbb56c7705eb9cd7372b725da6152b4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=cf115d606eea814d659588953cbaa5b0b16e234c commit cf115d606eea814d659588953cbaa5b0b16e234c Author: H.J. Lu <hjl.tools@gmail.com> Date: Fri Nov 7 12:22:53 2014 -0800 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. ----------------------------------------------------------------------- Summary of changes: bfd/ChangeLog | 9 +++++++++ bfd/elf64-x86-64.c | 22 ++++++++++++++++------ gas/ChangeLog | 9 +++++++++ gas/config/tc-i386.c | 9 +++++++++ gas/testsuite/ChangeLog | 9 +++++++++ gas/testsuite/gas/i386/ilp32/x32-tls.d | 13 +++++++++++++ gas/testsuite/gas/i386/ilp32/x32-tls.s | 13 +++++++++++++ ld/testsuite/ChangeLog | 8 ++++++++ ld/testsuite/ld-x86-64/tlsie4.dd | 4 ++-- 9 files changed, 88 insertions(+), 8 deletions(-) create mode 100644 gas/testsuite/gas/i386/ilp32/x32-tls.d create mode 100644 gas/testsuite/gas/i386/ilp32/x32-tls.s Fixed for 2.25. This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "gdb and binutils". The branch, master has been updated via abd58633c1985c879a84249650172da639773730 (commit) via 6d19a37a8f3be44fb006c7854a12f9edcb74080d (commit) from d50abe23863b5bbb40fab2b785f0df8917b1b7dd (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=abd58633c1985c879a84249650172da639773730 commit abd58633c1985c879a84249650172da639773730 Author: Alan Modra <amodra@gmail.com> Date: Wed Nov 12 15:00:01 2014 +1030 Fix z80-coff build breakage * config/tc-z80.c (parse_exp_not_indexed, parse_exp): Warning fixes. https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6d19a37a8f3be44fb006c7854a12f9edcb74080d commit 6d19a37a8f3be44fb006c7854a12f9edcb74080d Author: Alan Modra <amodra@gmail.com> Date: Wed Nov 12 14:54:23 2014 +1030 Fix x86 non-ELF build breakage PR ld/17482 * config/tc-i386.c (output_insn): Don't test x86_elf_abi when not ELF. ----------------------------------------------------------------------- Summary of changes: gas/ChangeLog | 10 ++++++++++ gas/config/tc-i386.c | 2 ++ gas/config/tc-z80.c | 4 ++++ 3 files changed, 16 insertions(+), 0 deletions(-) This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "gdb and binutils". The branch, binutils-2_25-branch has been updated via 10153947d78f6ead12735a2d9198cf46c19449dd (commit) from b02026e71aeb7fab4fb3f0466dca83c73515132d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=10153947d78f6ead12735a2d9198cf46c19449dd commit 10153947d78f6ead12735a2d9198cf46c19449dd Author: Alan Modra <amodra@gmail.com> Date: Wed Nov 12 14:54:23 2014 +1030 Fix x86 non-ELF build breakage PR ld/17482 * config/tc-i386.c (output_insn): Don't test x86_elf_abi when not ELF. ----------------------------------------------------------------------- Summary of changes: gas/ChangeLog | 6 ++++++ gas/config/tc-i386.c | 2 ++ 2 files changed, 8 insertions(+), 0 deletions(-) |