mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 01:50:24 +08:00
Fix a bug in objcopy/strip's ability to merge notes in multiple same-named sections.
* objcopy.c (copy_object): Compare input and output sections by pointer rather than name.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2020-10-06 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
* objcopy.c (copy_object): Compare input and output sections by
|
||||||
|
pointer rather than name.
|
||||||
|
|
||||||
2020-10-05 Nick Clifton <nickc@redhat.com>
|
2020-10-05 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
PR 26698
|
PR 26698
|
||||||
|
@ -3322,14 +3322,12 @@ copy_object (bfd *ibfd, bfd *obfd, const bfd_arch_info_type *input_arch)
|
|||||||
/* It is likely that output sections are in the same order
|
/* It is likely that output sections are in the same order
|
||||||
as the input sections, but do not assume that this is
|
as the input sections, but do not assume that this is
|
||||||
the case. */
|
the case. */
|
||||||
if (strcmp (bfd_section_name (merged->sec),
|
if (merged->sec->output_section != osec)
|
||||||
bfd_section_name (osec)) != 0)
|
|
||||||
{
|
{
|
||||||
for (merged = merged_note_sections;
|
for (merged = merged_note_sections;
|
||||||
merged != NULL;
|
merged != NULL;
|
||||||
merged = merged->next)
|
merged = merged->next)
|
||||||
if (strcmp (bfd_section_name (merged->sec),
|
if (merged->sec->output_section == osec)
|
||||||
bfd_section_name (osec)) == 0)
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (merged == NULL)
|
if (merged == NULL)
|
||||||
|
Reference in New Issue
Block a user