PR 28058
bfd * elf.c (bfd_section_from_shdr): Set has_secondary_relocs flag.
(_bfd_elf_slurp_secondary_reloc_section): Use it for early-out.
+2021-07-09 Nick Clifton <nickc@redhat.com>
+
+ Backport from mainline:
+
+ 2021-06-08 Michael Matz <matz@suse.de>
+
+ PR 28058
+ * elf.c (bfd_section_from_shdr): Set has_secondary_relocs flag.
+ (_bfd_elf_slurp_secondary_reloc_section): Use it for early-out.
+
2021-07-09 Nick Clifton <nickc@redhat.com>
Backport this patch from the mainline:
"for section %pA found - ignoring"),
abfd, name, target_sect);
}
+ else
+ esdt->has_secondary_relocs = TRUE;
goto success;
}
#endif
r_sym = elf32_r_sym;
+ if (!elf_section_data (sec)->has_secondary_relocs)
+ return TRUE;
+
/* Discover if there are any secondary reloc sections
associated with SEC. */
for (relsec = abfd->sections; relsec != NULL; relsec = relsec->next)