aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-arm.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2016-05-18 15:44:46 +0930
committerAlan Modra <amodra@gmail.com>2016-05-18 15:46:34 +0930
commit7f9919700d0023db7d66fee9f437251a263f5d53 (patch)
tree52925d442ae1c785462cdbdd15e20d3dce2c8966 /bfd/elf32-arm.c
parentc69075ac096c9de1b8a532123b493173f8fe0975 (diff)
downloadgdb-7f9919700d0023db7d66fee9f437251a263f5d53.zip
gdb-7f9919700d0023db7d66fee9f437251a263f5d53.tar.gz
gdb-7f9919700d0023db7d66fee9f437251a263f5d53.tar.bz2
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.c11
1 files changed, 10 insertions, 1 deletions
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,