21 lines
695 B
Diff
21 lines
695 B
Diff
Fix for bsc#1179341
|
|
|
|
the movload->movconst relaxation can be done only with REX
|
|
rewriting, and hence needs a GOTPCRELX relocation. With old object
|
|
files we might still see GOTPCREL relocs, even with REX bytes available.
|
|
We still can't do such rewriting and hence need to stay with the old
|
|
rewriting into a lea.
|
|
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
|
|
index 549a8be6a6..b89b0023db 100644
|
|
--- a/bfd/elf64-x86-64.c
|
|
+++ b/bfd/elf64-x86-64.c
|
|
@@ -1731,7 +1731,7 @@ elf_x86_64_convert_load_reloc (bfd *abfd,
|
|
|
|
if (opcode == 0x8b)
|
|
{
|
|
- if (abs_symbol && local_ref && relocx)
|
|
+ if (abs_symbol && local_ref && relocx && rex)
|
|
to_reloc_pc32 = false;
|
|
|
|
if (to_reloc_pc32)
|