aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-x86-64.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2016-05-13 10:59:32 -0700
committerH.J. Lu <hjl.tools@gmail.com>2016-05-13 11:07:02 -0700
commit2168b2688ae343a61c467450068503295a5e3deb (patch)
tree5ea6df0bc1d59129657f33172000d30e91cad252 /bfd/elf64-x86-64.c
parentd2edc834f769d9d05756c66f01c3bf05349a7fb7 (diff)
downloadgdb-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.c5
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;