From: H.J. Lu Date: Fri, 22 Apr 2016 04:45:57 +0000 (-0700) Subject: Exclude linker created file from dynobj X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6645479e9dc9470d22393d5bc4ef2ef2d391e848;p=binutils-gdb.git Exclude linker created file from dynobj Some ELF targets create a "linker stubs" fake bfd. Don't use it to set dynobj. * elflink.c (_bfd_elf_link_create_dynstrtab): Exclude linker created file from dynobj. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index d668652e4b8..a8a29bd298f 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2016-04-21 H.J. Lu + + * elflink.c (_bfd_elf_link_create_dynstrtab): Exclude linker + created file from dynobj. + 2016-04-21 H.J. Lu * elflink.c (_bfd_elf_link_create_dynstrtab): Set dynobj to a diff --git a/bfd/elflink.c b/bfd/elflink.c index 13233cb50be..6f6726648fd 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -213,7 +213,8 @@ _bfd_elf_link_create_dynstrtab (bfd *abfd, struct bfd_link_info *info) { bfd *ibfd; for (ibfd = info->input_bfds; ibfd; ibfd = ibfd->link.next) - if ((ibfd->flags & (DYNAMIC | BFD_PLUGIN)) == 0) + if ((ibfd->flags + & (DYNAMIC | BFD_LINKER_CREATED | BFD_PLUGIN)) == 0) { abfd = ibfd; break;