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