[binutils-gdb] PR31999 strip [.gnu.build.attributes]: failed

Alan Modra amodra@sourceware.org
Sat Jul 20 00:43:29 GMT 2024


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=964be70df76a830cc8d514f86dd44dd6e5bdc114

commit 964be70df76a830cc8d514f86dd44dd6e5bdc114
Author: Alan Modra <amodra@gmail.com>
Date:   Sat Jul 20 10:08:32 2024 +0930

    PR31999 strip [.gnu.build.attributes]: failed
    
            PR 31999
            * objcopy.c (merge_gnu_build_notes): Always set *new_size.

Diff:
---
 binutils/objcopy.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index 64033673a9e..24e31cc5805 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -2203,6 +2203,7 @@ merge_gnu_build_notes (bfd *          abfd,
   unsigned long       previous_open_end = 0;
   long                relsize;
 
+  *new_size = size;
   relsize = bfd_get_reloc_upper_bound (abfd, sec);
   if (relsize > 0)
     {


More information about the Binutils-cvs mailing list