diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2016-05-13 10:59:32 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2016-05-13 11:07:02 -0700 |
commit | 2168b2688ae343a61c467450068503295a5e3deb (patch) | |
tree | 5ea6df0bc1d59129657f33172000d30e91cad252 /bfd/elf64-x86-64.c | |
parent | d2edc834f769d9d05756c66f01c3bf05349a7fb7 (diff) | |
download | gdb-2168b2688ae343a61c467450068503295a5e3deb.zip gdb-2168b2688ae343a61c467450068503295a5e3deb.tar.gz gdb-2168b2688ae343a61c467450068503295a5e3deb.tar.bz2 |
Don't convert GOTPCREL relocation against large section
bfd/
PR ld/20093
* elf64-x86-64.c (elf_x86_64_convert_load_reloc): Don't convert
GOTPCREL relocation against large section.
ld/
PR ld/20093
* testsuite/ld-x86-64/pr20093-1.d: New file.
* testsuite/ld-x86-64/pr20093-1.s: Likewise.
* testsuite/ld-x86-64/pr20093-2.d: Likewise.
* testsuite/ld-x86-64/pr20093-2.s: Likewise.
* testsuite/ld-x86-64/x86-64.exp: Run pr20093-1 and pr20093-2.
Diffstat (limited to 'bfd/elf64-x86-64.c')
-rw-r--r-- | bfd/elf64-x86-64.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index 0bcd59d..9fc884e 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -1806,6 +1806,11 @@ elf_x86_64_convert_load_reloc (bfd *abfd, asection *sec, return TRUE; } + /* Don't convert GOTPCREL relocation against large section. */ + if (elf_section_data (tsec) != NULL + && (elf_section_flags (tsec) & SHF_X86_64_LARGE) != 0) + return TRUE; + /* We can only estimate relocation overflow for R_X86_64_PC32. */ if (!to_reloc_pc32) goto convert; |