--- binutils.orig/binutils/objcopy.c 2021-01-14 09:09:30.796925559 +0000 +++ binutils-2.35/binutils/objcopy.c 2021-01-14 15:45:38.105153686 +0000 @@ -3313,14 +3313,12 @@ copy_object (bfd *ibfd, bfd *obfd, const /* It is likely that output sections are in the same order as the input sections, but do not assume that this is the case. */ - if (strcmp (bfd_section_name (merged->sec), - bfd_section_name (osec)) != 0) + if (merged->sec->output_section != osec) { for (merged = merged_note_sections; merged != NULL; merged = merged->next) - if (strcmp (bfd_section_name (merged->sec), - bfd_section_name (osec)) == 0) + if (merged->sec->output_section == osec) break; if (merged == NULL)