1 --- binutils.orig/binutils/objcopy.c 2021-02-18 11:35:48.062479490 +0000
2 +++ binutils-2.30/binutils/objcopy.c 2021-02-18 11:36:52.207071148 +0000
3 @@ -2224,6 +2224,11 @@ merge_gnu_build_notes (bfd * ab
8 + /* This can happen with PPC64LE binaries where empty notes are
9 + encoded as start = end + 4. */
12 if (is_open_note (pnote))
15 --- binutils.orig/binutils/objcopy.c 2021-02-22 10:44:20.107263089 +0000
16 +++ binutils-2.35.1/binutils/objcopy.c 2021-02-22 16:07:12.134344229 +0000
17 @@ -2243,23 +2243,8 @@ merge_gnu_build_notes (bfd * ab
21 - if (! is_64bit (abfd))
23 - start = bfd_get_32 (abfd, pnote->note.descdata);
24 - end = bfd_get_32 (abfd, pnote->note.descdata + 4);
28 - start = bfd_get_64 (abfd, pnote->note.descdata);
29 - /* FIXME: For version 1 and 2 notes we should try to
30 - calculate the end address by finding a symbol whose
31 - value is START, and then adding in its size.
33 - For now though, since v1 and v2 was not intended to
34 - handle gaps, we chose an artificially large end
38 + start = bfd_get_32 (abfd, pnote->note.descdata);
39 + end = bfd_get_32 (abfd, pnote->note.descdata + 4);