aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-06-24 10:13:55 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-06-24 10:20:41 -0700
commit59cab532835904f368b0aa99267afba5fda5ded2 (patch)
tree8fb4af8a6efb9bbe553be48d6ab564eb15ee0f97 /config
parentsim: trace: drop unused trace_one_insn (diff)
downloadbinutils-gdb-59cab532835904f368b0aa99267afba5fda5ded2.tar.gz
binutils-gdb-59cab532835904f368b0aa99267afba5fda5ded2.tar.bz2
binutils-gdb-59cab532835904f368b0aa99267afba5fda5ded2.zip
Don't convert R_X86_64_GOTPCREL if it will overflow
When converting "mov foo@GOTPCREL(%rip), %reg" to "lea foo(%rip), %reg" with R_X86_64_PC32 relocation, it may overflow if the target section is more than 2GB away. This patch estimates distance between mov instruction and the target section. We convert R_X86_64_GOTPCREL to R_X86_64_PC32 only if their distance is less than 2GB. PR ld/18591 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Don't convert R_X86_64_GOTPCREL to R_X86_64_PC32 if it will cause relocation overflow.
Diffstat (limited to 'config')
0 files changed, 0 insertions, 0 deletions