This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] elf32-arm.c build breakage


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

commit 7f9919700d0023db7d66fee9f437251a263f5d53
Author: Alan Modra <amodra@gmail.com>
Date:   Wed May 18 15:44:46 2016 +0930

    elf32-arm.c build breakage
    
    	* elf32-arm.c (elf32_arm_size_stubs): Free or cache local syms
    	for each BFD.  Don't goto error_ret_free_local from outside loop.

Diff:
---
 bfd/ChangeLog   |  5 +++++
 bfd/elf32-arm.c | 11 ++++++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 57a8189..c5341e4 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2016-05-18  Alan Modra  <amodra@gmail.com>
+
+	* elf32-arm.c (elf32_arm_size_stubs): Free or cache local syms
+	for each BFD.  Don't goto error_ret_free_local from outside loop.
+
 2016-05-17  Maciej W. Rozycki  <macro@imgtec.com>
 
 	* elf-s390-common.c (elf_s390_add_symbol_hook): Remove
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index c21d45a..8698fff 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -5663,6 +5663,15 @@ elf32_arm_size_stubs (bfd *output_bfd,
 		  != 0)
 		goto error_ret_free_local;
 	    }
+
+	  if (local_syms != NULL
+	      && symtab_hdr->contents != (unsigned char *) local_syms)
+	    {
+	      if (!info->keep_memory)
+		free (local_syms);
+	      else
+		symtab_hdr->contents = (unsigned char *) local_syms;
+	    }
 	}
 
       if (prev_num_a8_fixes != num_a8_fixes)
@@ -5694,7 +5703,7 @@ elf32_arm_size_stubs (bfd *output_bfd,
 			 a8_fixes[i].section, htab);
 
 	    if (stub_sec == NULL)
-	      goto error_ret_free_local;
+	      return FALSE;
 
 	    stub_sec->size
 	      += find_stub_size_and_template (a8_fixes[i].stub_type, NULL,


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]