aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-i386.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2011-05-01 12:04:10 +0000
committerAlan Modra <amodra@gmail.com>2011-05-01 12:04:10 +0000
commit9d4057ee3bda54d4df12f2a2a795e8c6b3dc45b4 (patch)
tree8b0359c2e07323057f280da13a118d65724b165e /bfd/elf32-i386.c
parentdee71c492f7df28355b9e0968af404ee9f44e31b (diff)
downloadgdb-9d4057ee3bda54d4df12f2a2a795e8c6b3dc45b4.zip
gdb-9d4057ee3bda54d4df12f2a2a795e8c6b3dc45b4.tar.gz
gdb-9d4057ee3bda54d4df12f2a2a795e8c6b3dc45b4.tar.bz2
PR ld/12718
* elf32-i386.c (elf_i386_check_relocs): Ensure dynobj set before creating ifunc sections. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
Diffstat (limited to 'bfd/elf32-i386.c')
-rw-r--r--bfd/elf32-i386.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index e32ec83..ee1511f 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -1376,7 +1376,9 @@ elf_i386_check_relocs (bfd *abfd,
case R_386_PLT32:
case R_386_GOT32:
case R_386_GOTOFF:
- if (!_bfd_elf_create_ifunc_sections (abfd, info))
+ if (htab->elf.dynobj == NULL)
+ htab->elf.dynobj = abfd;
+ if (!_bfd_elf_create_ifunc_sections (htab->elf.dynobj, info))
return FALSE;
break;
}