diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2012-10-25 13:36:05 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2012-10-25 13:36:05 +0000 |
commit | 659b79837f5a5af91f77816787bf8cb666b1223c (patch) | |
tree | bba4bd53f890f9829314454d670a738a12e1f9c5 /bfd/elf32-i386.c | |
parent | 7d9bcb88cef5ad7eb3ca28d4516044750802e4c0 (diff) | |
download | binutils-redhat-659b79837f5a5af91f77816787bf8cb666b1223c.tar.gz |
Replace _GLOBAL_OFFSET_TABLE_ lookup with htab->elf.hgot
* elf32-i386.c (elf_i386_size_dynamic_sections): Replace
_GLOBAL_OFFSET_TABLE_ lookup with htab->elf.hgot.
* elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
Diffstat (limited to 'bfd/elf32-i386.c')
-rw-r--r-- | bfd/elf32-i386.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index eb90a91c2d..1b04a6ef1f 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -2863,15 +2863,10 @@ elf_i386_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) if (htab->elf.sgotplt) { - struct elf_link_hash_entry *got; - got = elf_link_hash_lookup (elf_hash_table (info), - "_GLOBAL_OFFSET_TABLE_", - FALSE, FALSE, FALSE); - /* Don't allocate .got.plt section if there are no GOT nor PLT entries and there is no reference to _GLOBAL_OFFSET_TABLE_. */ - if ((got == NULL - || !got->ref_regular_nonweak) + if ((htab->elf.hgot == NULL + || !htab->elf.hgot->ref_regular_nonweak) && (htab->elf.sgotplt->size == get_elf_backend_data (output_bfd)->got_header_size) && (htab->elf.splt == NULL |