2020-12-04 15:56:26 +01:00
|
|
|
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)
|
|
|
|
{
|
2021-01-28 14:33:36 +01:00
|
|
|
- if (abs_symbol && local_ref && relocx)
|
|
|
|
+ if (abs_symbol && local_ref && relocx && rex)
|
2020-12-04 15:56:26 +01:00
|
|
|
to_reloc_pc32 = FALSE;
|
|
|
|
|
|
|
|
if (to_reloc_pc32)
|