diff options
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf32-arm.c | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index ffe527c..a1ef734 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2019-11-21 Alan Modra <amodra@gmail.com> + + * elf32-arm.c (elf32_arm_size_stubs): Exclude dynamic library + BFDs that have not been loaded. + 2019-11-19 Alan Modra <amodra@gmail.com> PR 25197 diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index f27ee42..dca208f 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -6527,8 +6527,11 @@ elf32_arm_size_stubs (bfd *output_bfd, asection *section; Elf_Internal_Sym *local_syms = NULL; - if (!is_arm_elf (input_bfd) - || (elf_dyn_lib_class (input_bfd) & DYN_AS_NEEDED) != 0) + if (!is_arm_elf (input_bfd)) + continue; + if ((input_bfd->flags & DYNAMIC) != 0 + && (elf_sym_hashes (input_bfd) == NULL + || (elf_dyn_lib_class (input_bfd) & DYN_AS_NEEDED) != 0)) continue; num_a8_relocs = 0; |