mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 19:50:13 +08:00
PR23788, objcopy: failed to find link section
Symbol tables can change when a number of objcopy options are used. I figure string tables are similarly changeable. PR 23788 * elf.c (section_match): Don't require a size match for SHT_SYMTAB or SHT_STRTAB.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2018-10-20 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
PR 23788
|
||||||
|
* elf.c (section_match): Don't require a size match for SHT_SYMTAB
|
||||||
|
or SHT_STRTAB.
|
||||||
|
|
||||||
2018-10-17 Alan Modra <amodra@gmail.com>
|
2018-10-17 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
PR 23653
|
PR 23653
|
||||||
|
18
bfd/elf.c
18
bfd/elf.c
@ -1299,15 +1299,15 @@ static bfd_boolean
|
|||||||
section_match (const Elf_Internal_Shdr * a,
|
section_match (const Elf_Internal_Shdr * a,
|
||||||
const Elf_Internal_Shdr * b)
|
const Elf_Internal_Shdr * b)
|
||||||
{
|
{
|
||||||
return
|
if (a->sh_type != b->sh_type
|
||||||
a->sh_type == b->sh_type
|
|| ((a->sh_flags ^ b->sh_flags) & ~SHF_INFO_LINK) != 0
|
||||||
&& (a->sh_flags & ~ SHF_INFO_LINK)
|
|| a->sh_addralign != b->sh_addralign
|
||||||
== (b->sh_flags & ~ SHF_INFO_LINK)
|
|| a->sh_entsize != b->sh_entsize)
|
||||||
&& a->sh_addralign == b->sh_addralign
|
return FALSE;
|
||||||
&& a->sh_size == b->sh_size
|
if (a->sh_type == SHT_SYMTAB
|
||||||
&& a->sh_entsize == b->sh_entsize
|
|| a->sh_type == SHT_STRTAB)
|
||||||
/* FIXME: Check sh_addr ? */
|
return TRUE;
|
||||||
;
|
return a->sh_size == b->sh_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Find a section in OBFD that has the same characteristics
|
/* Find a section in OBFD that has the same characteristics
|
||||||
|
Reference in New Issue
Block a user