From 8568422270e312310c47048750733652c7bd979f Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Thu, 18 Feb 2021 11:43:26 +0000 Subject: 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. --- binutils/objcopy.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'binutils/objcopy.c') 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) -- cgit v1.1