+
+ PR ld/13947
+ * elflink.c (bfd_elf_final_link): Set reloc_count to 0 for
+ reloc sections.
+
* 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);
+
+ PR ld/13947
+ * ld-x86-64/x86-64.exp: Run pr13947.
+ * ld-x86-64/pr13947.d: New file.
+ * ld-x86-64/pr13947.s: Likewise.
+
* ld-arm/arm-elf.exp (armelftests_common): Move cases using