diff options
author | Alan Modra <amodra@gmail.com> | 2016-05-18 15:44:46 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2016-05-18 15:46:34 +0930 |
commit | 7f9919700d0023db7d66fee9f437251a263f5d53 (patch) | |
tree | 52925d442ae1c785462cdbdd15e20d3dce2c8966 /bfd/elf32-arm.c | |
parent | c69075ac096c9de1b8a532123b493173f8fe0975 (diff) | |
download | binutils-gdb-7f9919700d0023db7d66fee9f437251a263f5d53.tar.gz |
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.
Diffstat (limited to 'bfd/elf32-arm.c')
-rw-r--r-- | bfd/elf32-arm.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index c21d45a4fbc..8698fff9305 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, |