+2018-07-02 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/23324
+ * elf64-x86-64.c (elf_x86_64_relocate_section): Clear the
+ R_X86_64_converted_reloc_bit bit.
+
2018-07-02 Jeff Muizelaar <jrmuizel@gmail.com>
Tom Tromey <tom@tromey.com>
continue;
}
+ r_symndx = htab->r_sym (rel->r_info);
converted_reloc = (r_type & R_X86_64_converted_reloc_bit) != 0;
- r_type &= ~R_X86_64_converted_reloc_bit;
+ if (converted_reloc)
+ {
+ r_type &= ~R_X86_64_converted_reloc_bit;
+ rel->r_info = htab->r_info (r_symndx, r_type);
+ }
if (r_type >= (int) R_X86_64_standard)
return _bfd_unrecognized_reloc (input_bfd, input_section, r_type);
else
howto = (x86_64_elf_howto_table
+ ARRAY_SIZE (x86_64_elf_howto_table) - 1);
- r_symndx = htab->r_sym (rel->r_info);
h = NULL;
sym = NULL;
sec = NULL;
+2018-07-02 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/23324
+ * testsuite/ld-x86-64/pr23324.s: New file.
+ * testsuite/ld-x86-64/pr23324a.d: Likewise.
+ * testsuite/ld-x86-64/pr23324b.d: Likewise.
+
2018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
* arm-dis.c (select_arm_features): Fix typo in heading comment. Allow
--- /dev/null
+ .text
+ .globl _start
+ .type _start,@function
+_start:
+ movq _start@GOTPCREL(%rip), %rsi
+ ret
--- /dev/null
+#source: pr23324.s
+#as: --64 -mrelax-relocations=yes
+#ld: -q -melf_x86_64 -pie
+#readelf: -r --wide
+
+Relocation section '.rela.text' at offset 0x[0-9a-f]+ contains 1 entry:
+ +Offset +Info +Type +Sym.* Value +Symbol's Name \+ Addend
+[0-9a-f]+ +[0-9a-f]+ +R_X86_64_PC32 +[0-9a-f]+ +_start - 4
--- /dev/null
+#source: pr23324.s
+#as: --x32 -mrelax-relocations=yes
+#ld: -q -melf32_x86_64 -pie
+#readelf: -r --wide
+
+Relocation section '.rela.text' at offset 0x[0-9a-f]+ contains 1 entry:
+ +Offset +Info +Type +Sym.* Value +Symbol's Name \+ Addend
+[0-9a-f]+ +[0-9a-f]+ +R_X86_64_PC32 +[0-9a-f]+ +_start - 4
run_dump_test "pr22782b"
run_dump_test "pr23189"
run_dump_test "pr23194"
+run_dump_test "pr23324a"
+run_dump_test "pr23324b"
if { ![istarget "x86_64-*-linux*"] && ![istarget "x86_64-*-nacl*"]} {
return