mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-21 02:24:17 +08:00
Stop the BFD library from failing when encountering a second set of relocs for the same section.
PR 24456 * elf.c (bfd_section_from_shdr): Issue an informative warning message and continue processing other sections after encountering a reloc section for a section which already has other relocs associated with it.
This commit is contained in:
@ -1,3 +1,11 @@
|
|||||||
|
2019-08-23 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
PR 24456
|
||||||
|
* elf.c (bfd_section_from_shdr): Issue an informative warning
|
||||||
|
message and continue processing other sections after encountering
|
||||||
|
a reloc section for a section which already has other relocs
|
||||||
|
associated with it.
|
||||||
|
|
||||||
2019-08-23 Alan Modra <amodra@gmail.com>
|
2019-08-23 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
PR 24933
|
PR 24933
|
||||||
|
13
bfd/elf.c
13
bfd/elf.c
@ -2466,9 +2466,18 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
|
|||||||
else
|
else
|
||||||
p_hdr = &esdt->rel.hdr;
|
p_hdr = &esdt->rel.hdr;
|
||||||
|
|
||||||
/* PR 17512: file: 0b4f81b7. */
|
/* PR 17512: file: 0b4f81b7.
|
||||||
|
Also see PR 24456, for a file which deliberately has two reloc
|
||||||
|
sections. */
|
||||||
if (*p_hdr != NULL)
|
if (*p_hdr != NULL)
|
||||||
goto fail;
|
{
|
||||||
|
_bfd_error_handler
|
||||||
|
/* xgettext:c-format */
|
||||||
|
(_("%pB: warning: multiple relocation sections for section %pA \
|
||||||
|
found - ignoring all but the first"),
|
||||||
|
abfd, target_sect);
|
||||||
|
goto success;
|
||||||
|
}
|
||||||
hdr2 = (Elf_Internal_Shdr *) bfd_alloc (abfd, sizeof (*hdr2));
|
hdr2 = (Elf_Internal_Shdr *) bfd_alloc (abfd, sizeof (*hdr2));
|
||||||
if (hdr2 == NULL)
|
if (hdr2 == NULL)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
Reference in New Issue
Block a user