diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2017-09-06 05:06:35 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2017-09-06 05:06:35 -0700 |
commit | 78984959cb385388e29dcc88dc169449344f22d7 (patch) | |
tree | 728839140d195a3653a3e33e5957ecab476f09e8 /ld | |
parent | 419414eafcee7cd749ee4622ef25020e48b52cc4 (diff) | |
download | fsf-binutils-gdb-78984959cb385388e29dcc88dc169449344f22d7.zip fsf-binutils-gdb-78984959cb385388e29dcc88dc169449344f22d7.tar.gz fsf-binutils-gdb-78984959cb385388e29dcc88dc169449344f22d7.tar.bz2 |
x86-64: Add R_X86_64_converted_reloc_bit
Add R_X86_64_converted_reloc_bit to relocation type to indicate if a
relocation is converted from a GOTPCREL relocation. Linker now generates
failed to convert GOTPCREL relocation; relink with --no-relax
for all cases, including relocations against local symbols.
bfd/
* elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
(elf_x86_64_info_to_howto): Get the real relocation type by
masking out R_X86_64_converted_reloc_bit.
(elf_x86_64_check_tls_transition): Get the real relocation type
by masking out R_X86_64_converted_reloc_bit.
(elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
instead of setting converted_reloc.
(elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
instead of converted_reloc. Get the real relocation type by
masking out R_X86_64_converted_reloc_bit.
(elf_x86_64_link_setup_gnu_properties): Verify that the value of
R_X86_64_converted_reloc_bit is valid.
* elfxx-x86.h (converted_reloc): Removed.
ld/
* testsuite/ld-x86-64/pr19609-2a.d: Updated.
* testsuite/ld-x86-64/pr19609-2b.d: Likewise.
* testsuite/ld-x86-64/pr19609-4a.d: Likewise.
* testsuite/ld-x86-64/pr19609-4c.d: Likewise.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/pr19609-2a.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/pr19609-2b.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/pr19609-4a.d | 3 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/pr19609-4c.d | 3 |
5 files changed, 11 insertions, 6 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 7313795..98318e9 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,10 @@ +2017-09-06 H.J. Lu <hongjiu.lu@intel.com> + + * testsuite/ld-x86-64/pr19609-2a.d: Updated. + * testsuite/ld-x86-64/pr19609-2b.d: Likewise. + * testsuite/ld-x86-64/pr19609-4a.d: Likewise. + * testsuite/ld-x86-64/pr19609-4c.d: Likewise. + 2017-09-05 H.J. Lu <hongjiu.lu@intel.com> * testsuite/ld-x86-64/pr19609-5d.d: Updated. diff --git a/ld/testsuite/ld-x86-64/pr19609-2a.d b/ld/testsuite/ld-x86-64/pr19609-2a.d index e2c6c89..2bed641 100644 --- a/ld/testsuite/ld-x86-64/pr19609-2a.d +++ b/ld/testsuite/ld-x86-64/pr19609-2a.d @@ -1,4 +1,4 @@ #source: pr19609-2.s #as: --64 -mrelax-relocations=yes #ld: -melf_x86_64 -Ttext=0x70000000 -Tdata=0xa0000000 -#error: .*relocation truncated to fit: R_X86_64_32S .* +#error: failed to convert GOTPCREL relocation; relink with --no-relax diff --git a/ld/testsuite/ld-x86-64/pr19609-2b.d b/ld/testsuite/ld-x86-64/pr19609-2b.d index ead4987..3741ebb 100644 --- a/ld/testsuite/ld-x86-64/pr19609-2b.d +++ b/ld/testsuite/ld-x86-64/pr19609-2b.d @@ -1,4 +1,4 @@ #source: pr19609-2.s #as: --x32 -mrelax-relocations=yes #ld: -melf32_x86_64 -Ttext=0x70000000 -Tdata=0xa0000000 -#error: .*relocation truncated to fit: R_X86_64_32S .* +#error: failed to convert GOTPCREL relocation; relink with --no-relax diff --git a/ld/testsuite/ld-x86-64/pr19609-4a.d b/ld/testsuite/ld-x86-64/pr19609-4a.d index ce952ed..f08843c 100644 --- a/ld/testsuite/ld-x86-64/pr19609-4a.d +++ b/ld/testsuite/ld-x86-64/pr19609-4a.d @@ -1,5 +1,4 @@ #source: pr19609-4.s #as: --64 -mrelax-relocations=yes #ld: -melf_x86_64 -Ttext=0x70000000 -Tdata=0xa0000000 -#error: .*relocation truncated to fit: R_X86_64_32S .* -#error: .*relocation truncated to fit: R_X86_64_32S .* +#error: failed to convert GOTPCREL relocation; relink with --no-relax diff --git a/ld/testsuite/ld-x86-64/pr19609-4c.d b/ld/testsuite/ld-x86-64/pr19609-4c.d index ce952ed..f08843c 100644 --- a/ld/testsuite/ld-x86-64/pr19609-4c.d +++ b/ld/testsuite/ld-x86-64/pr19609-4c.d @@ -1,5 +1,4 @@ #source: pr19609-4.s #as: --64 -mrelax-relocations=yes #ld: -melf_x86_64 -Ttext=0x70000000 -Tdata=0xa0000000 -#error: .*relocation truncated to fit: R_X86_64_32S .* -#error: .*relocation truncated to fit: R_X86_64_32S .* +#error: failed to convert GOTPCREL relocation; relink with --no-relax |