+2012-04-13 Alan Modra <amodra@gmail.com>
+
+ PR ld/13947
+ * elflink.c (bfd_elf_final_link): Set reloc_count to 0 for
+ reloc sections.
+
2012-04-12 David S. Miller <davem@davemloft.net>
* reloc.c (BFD_RELOC_SPARC_H34, BFD_RELOC_SPARC_SIZE32,
if (sec->flags & SEC_MERGE)
merged = TRUE;
- if (info->relocatable || info->emitrelocations)
+ if (esdo->this_hdr.sh_type == SHT_REL
+ || esdo->this_hdr.sh_type == SHT_RELA)
+ /* Some backends use reloc_count in relocation sections
+ to count particular types of relocs. Of course,
+ reloc sections themselves can't have relocations. */
+ reloc_count = 0;
+ else if (info->relocatable || info->emitrelocations)
reloc_count = sec->reloc_count;
else if (bed->elf_backend_count_relocs)
reloc_count = (*bed->elf_backend_count_relocs) (info, sec);
+2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/13947
+ * ld-x86-64/x86-64.exp: Run pr13947.
+ * ld-x86-64/pr13947.d: New file.
+ * ld-x86-64/pr13947.s: Likewise.
+
2012-04-13 Roland McGrath <mcgrathr@google.com>
* ld-arm/arm-elf.exp (armelftests_common): Move cases using
--- /dev/null
+#ld: -shared --emit-relocs
+#readelf: -S --wide
+
+#failif
+#...
+ +\[ [0-9]\] .rela.rela.plt +RELA +[0-9a-f]+ +[0-9a-f]+ 0+ +.*
+#...
--- /dev/null
+ .text
+ .globl foo
+ .type foo, @function
+foo:
+ call bar@PLT
run_dump_test "discarded1"
run_dump_test "pr12718"
run_dump_test "pr12921"
+run_dump_test "pr13947"
if { ![istarget "x86_64-*-linux*"] && ![istarget "x86_64-*-nacl*"]} {
return