mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-25 13:27:26 +08:00
Replace assertions with warning messages about ELF binaries containing multiple symbol tables.
PR binutils/18854 * elf.c (bfd_section_from_shdr): Replace assertions with warnings about multiple symbol tables.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2015-08-25 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
PR binutils/18854
|
||||||
|
* elf.c (bfd_section_from_shdr): Replace assertions with warnings
|
||||||
|
about multiple symbol tables.
|
||||||
|
|
||||||
2015-08-25 Renlin Li <renlin.li@arm.com>
|
2015-08-25 Renlin Li <renlin.li@arm.com>
|
||||||
|
|
||||||
* reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): Use LP64 instead of
|
* reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): Use LP64 instead of
|
||||||
|
20
bfd/elf.c
20
bfd/elf.c
@ -1833,7 +1833,15 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
|
|||||||
goto success;
|
goto success;
|
||||||
}
|
}
|
||||||
|
|
||||||
BFD_ASSERT (elf_onesymtab (abfd) == 0);
|
/* PR 18854: A binary might contain more than one symbol table.
|
||||||
|
Unusual, but possible. Warn, but continue. */
|
||||||
|
if (elf_onesymtab (abfd) != 0)
|
||||||
|
{
|
||||||
|
(*_bfd_error_handler)
|
||||||
|
(_("%B: warning: multiple symbol tables detected - ignoring the table in section %u"),
|
||||||
|
abfd, shindex);
|
||||||
|
goto success;
|
||||||
|
}
|
||||||
elf_onesymtab (abfd) = shindex;
|
elf_onesymtab (abfd) = shindex;
|
||||||
elf_tdata (abfd)->symtab_hdr = *hdr;
|
elf_tdata (abfd)->symtab_hdr = *hdr;
|
||||||
elf_elfsections (abfd)[shindex] = hdr = &elf_tdata (abfd)->symtab_hdr;
|
elf_elfsections (abfd)[shindex] = hdr = &elf_tdata (abfd)->symtab_hdr;
|
||||||
@ -1898,7 +1906,15 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
|
|||||||
goto success;
|
goto success;
|
||||||
}
|
}
|
||||||
|
|
||||||
BFD_ASSERT (elf_dynsymtab (abfd) == 0);
|
/* PR 18854: A binary might contain more than one dynamic symbol table.
|
||||||
|
Unusual, but possible. Warn, but continue. */
|
||||||
|
if (elf_dynsymtab (abfd) != 0)
|
||||||
|
{
|
||||||
|
(*_bfd_error_handler)
|
||||||
|
(_("%B: warning: multiple dynamic symbol tables detected - ignoring the table in section %u"),
|
||||||
|
abfd, shindex);
|
||||||
|
goto success;
|
||||||
|
}
|
||||||
elf_dynsymtab (abfd) = shindex;
|
elf_dynsymtab (abfd) = shindex;
|
||||||
elf_tdata (abfd)->dynsymtab_hdr = *hdr;
|
elf_tdata (abfd)->dynsymtab_hdr = *hdr;
|
||||||
elf_elfsections (abfd)[shindex] = hdr = &elf_tdata (abfd)->dynsymtab_hdr;
|
elf_elfsections (abfd)[shindex] = hdr = &elf_tdata (abfd)->dynsymtab_hdr;
|
||||||
|
Reference in New Issue
Block a user