aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-arm.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2018-10-24 15:08:28 +1030
committerAlan Modra <amodra@gmail.com>2018-10-24 23:38:52 +1030
commit8c246a60c08d82066b16973bcd622e671300eb02 (patch)
treebf9abda94655f8c0a60483189264ae712306f4a7 /bfd/elf32-arm.c
parenta76dc3b7705c5c85efc00521ebfac49e80c3fedf (diff)
downloadgdb-8c246a60c08d82066b16973bcd622e671300eb02.zip
gdb-8c246a60c08d82066b16973bcd622e671300eb02.tar.gz
gdb-8c246a60c08d82066b16973bcd622e671300eb02.tar.bz2
cmse_scan segfault
elf_sym_hashes for as-needed libs will be zeroed if the library is found to be not needed. More than that, the local symbols for such a library should not be considered by cmse_scan. * elf32-arm.c (elf32_arm_size_stubs): Ignore as-needed libs that were not needed.
Diffstat (limited to 'bfd/elf32-arm.c')
-rw-r--r--bfd/elf32-arm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 2c321bb..5adec5e 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -6449,7 +6449,8 @@ elf32_arm_size_stubs (bfd *output_bfd,
asection *section;
Elf_Internal_Sym *local_syms = NULL;
- if (!is_arm_elf (input_bfd))
+ if (!is_arm_elf (input_bfd)
+ || (elf_dyn_lib_class (input_bfd) & DYN_AS_NEEDED) != 0)
continue;
num_a8_relocs = 0;