diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2017-09-05 11:24:01 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2017-09-05 11:24:14 -0700 |
commit | 8b43e456886c5b3aaba1ef93195ed888b15de242 (patch) | |
tree | 971277b504081ef9ea170bcb1b26e1bf5e757d9d /ld/testsuite/ld-x86-64/pr19609-6a.d | |
parent | 5eb5f85062a3d43bf449ded1b256d761d487f0d6 (diff) | |
download | gdb-8b43e456886c5b3aaba1ef93195ed888b15de242.zip gdb-8b43e456886c5b3aaba1ef93195ed888b15de242.tar.gz gdb-8b43e456886c5b3aaba1ef93195ed888b15de242.tar.bz2 |
x86-64: Improve GOTPCREL relocation conversion
When GOTPCREL relocation conversion leads to relocation overflow, we
may get a mysterious linker message, like
relocation truncated to fit: R_X86_64_32S against symbol `foo'
This patch changes the linker message to
failed to convert GOTPCREL relocation; relink with --no-relax
bfd/
* elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
argument. Don't check relocation overflow. Avoid relocation
overflow if --no-relax is used. Set converted_reloc on symbol
if a GOTPCREL relocation is converted.
(elf_x86_64_relocate_section): Issue a fatal error and suggest
--no-relax if GOTPCREL relocation conversion leads to relocation
overflow.
* elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
ld/
* testsuite/ld-x86-64/pr19609-4e.d: Updated.
* testsuite/ld-x86-64/pr19609-6a.d: Likewise.
Diffstat (limited to 'ld/testsuite/ld-x86-64/pr19609-6a.d')
-rw-r--r-- | ld/testsuite/ld-x86-64/pr19609-6a.d | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ld/testsuite/ld-x86-64/pr19609-6a.d b/ld/testsuite/ld-x86-64/pr19609-6a.d index 4802ffe..3c011d9 100644 --- a/ld/testsuite/ld-x86-64/pr19609-6a.d +++ b/ld/testsuite/ld-x86-64/pr19609-6a.d @@ -1,4 +1,4 @@ #source: pr19609-6.s #as: --64 -mrelax-relocations=yes #ld: -melf_x86_64 --defsym foobar=0x80000000 -#error: .*relocation truncated to fit: R_X86_64_32S .* +#error: failed to convert GOTPCREL relocation; relink with --no-relax |