aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2021-02-18 11:43:26 +0000
committerNick Clifton <nickc@redhat.com>2021-02-18 11:43:26 +0000
commit8568422270e312310c47048750733652c7bd979f (patch)
tree9f03e4fe5d1a51a0ae4a099f8700f3d0a821b135 /binutils
parentacde2092414878f94f03e9159fc679ff08390dcd (diff)
downloadgdb-8568422270e312310c47048750733652c7bd979f.zip
gdb-8568422270e312310c47048750733652c7bd979f.tar.gz
gdb-8568422270e312310c47048750733652c7bd979f.tar.bz2
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.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/objcopy.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 70ecb0a..fd46001 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 0e1047e..54a5943 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)