diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2015-06-24 10:13:55 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2015-06-24 10:20:41 -0700 |
commit | 59cab532835904f368b0aa99267afba5fda5ded2 (patch) | |
tree | 8fb4af8a6efb9bbe553be48d6ab564eb15ee0f97 /libiberty | |
parent | 602a67cbeaf6b42bc513a873aec82e53235b8754 (diff) | |
download | gdb-59cab532835904f368b0aa99267afba5fda5ded2.zip gdb-59cab532835904f368b0aa99267afba5fda5ded2.tar.gz gdb-59cab532835904f368b0aa99267afba5fda5ded2.tar.bz2 |
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 'libiberty')
0 files changed, 0 insertions, 0 deletions