aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2016-04-21 21:45:57 -0700
committerH.J. Lu <hjl.tools@gmail.com>2016-04-21 21:45:57 -0700
commit6645479e9dc9470d22393d5bc4ef2ef2d391e848 (patch)
treef633c1aa47874693aa26a964c584c70a48270677 /bfd
parent6cd255ca1f03550291bd05ac4548e383bca88c5f (diff)
downloadgdb-6645479e9dc9470d22393d5bc4ef2ef2d391e848.zip
gdb-6645479e9dc9470d22393d5bc4ef2ef2d391e848.tar.gz
gdb-6645479e9dc9470d22393d5bc4ef2ef2d391e848.tar.bz2
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.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elflink.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index d668652..a8a29bd 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,10 @@
2016-04-21 H.J. Lu <hongjiu.lu@intel.com>
+ * elflink.c (_bfd_elf_link_create_dynstrtab): Exclude linker
+ created file from dynobj.
+
+2016-04-21 H.J. Lu <hongjiu.lu@intel.com>
+
* elflink.c (_bfd_elf_link_create_dynstrtab): Set dynobj to a
normal input file if possible.
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 13233cb..6f67266 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;