mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 20:28:28 +08:00
Fix assertion failure in the BFD library when linking with --emit-relocs enabled.
PR 25681 * elf.c (_bfd_elf_map_sections_to_segments): When looking for a segment to use for PT_GNU_RELRO, ignore empty sections in a segment's current list.
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2020-03-24 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
PR 25681
|
||||||
|
* elf.c (_bfd_elf_map_sections_to_segments): When looking for a
|
||||||
|
segment to use for PT_GNU_RELRO, ignore empty sections in a
|
||||||
|
segment's current list.
|
||||||
|
|
||||||
2020-03-24 H.J. Lu <hongjiu.lu@intel.com>
|
2020-03-24 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
PR binutils/25717
|
PR binutils/25717
|
||||||
|
@ -5213,9 +5213,12 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info)
|
|||||||
{
|
{
|
||||||
i = m->count;
|
i = m->count;
|
||||||
while (--i != (unsigned) -1)
|
while (--i != (unsigned) -1)
|
||||||
if ((m->sections[i]->flags & (SEC_LOAD | SEC_HAS_CONTENTS))
|
{
|
||||||
== (SEC_LOAD | SEC_HAS_CONTENTS))
|
if (m->sections[i]->size > 0
|
||||||
break;
|
&& (m->sections[i]->flags & (SEC_LOAD | SEC_HAS_CONTENTS))
|
||||||
|
== (SEC_LOAD | SEC_HAS_CONTENTS))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (i != (unsigned) -1)
|
if (i != (unsigned) -1)
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user