61bcc6
--- binutils.orig/binutils/objcopy.c	2021-02-18 11:35:48.062479490 +0000
61bcc6
+++ binutils-2.30/binutils/objcopy.c	2021-02-18 11:36:52.207071148 +0000
61bcc6
@@ -2224,6 +2224,11 @@ merge_gnu_build_notes (bfd *          ab
61bcc6
 	  goto done;
61bcc6
 	}
61bcc6
 
61bcc6
+      if (start > end)
61bcc6
+	/* This can happen with PPC64LE binaries where empty notes are
61bcc6
+	   encoded as start = end + 4.  */
61bcc6
+	start = end;
61bcc6
+
61bcc6
       if (is_open_note (pnote))
61bcc6
 	{
61bcc6
 	  if (start)
61bcc6
--- binutils.orig/binutils/objcopy.c	2021-02-22 16:04:09.390542219 +0000
61bcc6
+++ binutils-2.30/binutils/objcopy.c	2021-02-22 16:04:32.214392597 +0000
61bcc6
@@ -2195,23 +2195,8 @@ merge_gnu_build_notes (bfd *          ab
61bcc6
 	  break;
61bcc6
 	  
61bcc6
 	case 8:
61bcc6
-	  if (! is_64bit (abfd))
61bcc6
-	    {
61bcc6
-	      start = bfd_get_32 (abfd, pnote->note.descdata);
61bcc6
-	      end = bfd_get_32 (abfd, pnote->note.descdata + 4);
61bcc6
-	    }
61bcc6
-	  else
61bcc6
-	    {
61bcc6
-	      start = bfd_get_64 (abfd, pnote->note.descdata);
61bcc6
-	      /* FIXME: For version 1 and 2 notes we should try to
61bcc6
-		 calculate the end address by finding a symbol whose
61bcc6
-		 value is START, and then adding in its size.
61bcc6
-
61bcc6
-		 For now though, since v1 and v2 was not intended to
61bcc6
-		 handle gaps, we chose an artificially large end
61bcc6
-		 address.  */
61bcc6
-	      end = (bfd_vma) 0x7ffffffffffffffUL;
61bcc6
-	    }
61bcc6
+	  start = bfd_get_32 (abfd, pnote->note.descdata);
61bcc6
+	  end = bfd_get_32 (abfd, pnote->note.descdata + 4);
61bcc6
 	  break;
61bcc6
 
61bcc6
 	case 16: