elf32-arm.c build breakage
authorAlan Modra <amodra@gmail.com>
Wed, 18 May 2016 06:14:46 +0000 (15:44 +0930)
committerAlan Modra <amodra@gmail.com>
Wed, 18 May 2016 06:16:34 +0000 (15:46 +0930)
* 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.

bfd/ChangeLog
bfd/elf32-arm.c

index 57a818923a05bda5793a525b159e05de61f9dfc5..c5341e491a2bae166fdaf0bc250cc06ec9fa5d28 100644 (file)
@@ -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
index c21d45a4fbc5e96dd392f0cdbce3e59d7a88aa8c..8698fff93056ab183ffb19fad50a13a731de0019 100644 (file)
@@ -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,