[binutils-gdb] Fix a problem merging empty annobin notes on ppc64le targets.
Nick Clifton
nickc@sourceware.org
Thu Feb 18 11:43:52 GMT 2021
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8568422270e312310c47048750733652c7bd979f
commit 8568422270e312310c47048750733652c7bd979f
Author: Nick Clifton <nickc@redhat.com>
Date: Thu Feb 18 11:43:26 2021 +0000
Fix a problem merging empty annobin notes on ppc64le targets.
* objcopy.c (merge_gnu_build_notes): Handle notes with a start
address that is higher than the end address.
Diff:
---
binutils/ChangeLog | 5 +++++
binutils/objcopy.c | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 70ecb0a4263..fd46001007f 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+2021-02-18 Nick Clifton <nickc@redhat.com>
+
+ * objcopy.c (merge_gnu_build_notes): Handle notes with a start
+ address that is higher than the end address.
+
2021-02-17 Alan Modra <amodra@gmail.com>
* dwarf.c: Include limits.h.
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index 0e1047e7482..54a59430f1b 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -2275,6 +2275,11 @@ merge_gnu_build_notes (bfd * abfd,
goto done;
}
+ if (start > end)
+ /* This can happen with PPC64LE binaries where empty notes are
+ encoded as start = end + 4. */
+ start = end;
+
if (is_open_note (pnote))
{
if (start)
More information about the Binutils-cvs
mailing list