5affbb
--- binutils.orig/binutils/objcopy.c	2020-10-30 14:21:10.448328799 +0000
5affbb
+++ binutils-2.30/binutils/objcopy.c	2020-10-30 14:22:08.406136672 +0000
5affbb
@@ -3257,14 +3257,12 @@ copy_object (bfd *ibfd, bfd *obfd, const
5affbb
 	  /* It is likely that output sections are in the same order
5affbb
 	     as the input sections, but do not assume that this is
5affbb
 	     the case.  */
5affbb
-	  if (strcmp (bfd_section_name (obfd, merged->sec),
5affbb
-		      bfd_section_name (obfd, osec)) != 0)
5affbb
+	  if (merged->sec->output_section != osec)
5affbb
 	    {
5affbb
 	      for (merged = merged_note_sections;
5affbb
 		   merged != NULL;
5affbb
 		   merged = merged->next)
5affbb
-		if (strcmp (bfd_section_name (obfd, merged->sec),
5affbb
-			    bfd_section_name (obfd, osec)) == 0)
5affbb
+		if (merged->sec->output_section == osec)
5affbb
 		  break;
5affbb
 
5affbb
 	      if (merged == NULL)