diff --git a/bfd/ChangeLog b/bfd/ChangeLog index c5f7ec7874..7e9fb6837c 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2018-10-24 Alan Modra + + * elf32-arm.c (elf32_arm_size_stubs): Ignore as-needed libs that + were not needed. + 2018-10-23 Alan Modra PR 23806 diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index 2c321bbcb6..5adec5e473 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;