aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-x86-64.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-10-25 13:36:08 +0000
committerH.J. Lu <hjl.tools@gmail.com>2012-10-25 13:36:08 +0000
commit9d4b2dba0e5f61cbec871f70e0a20c4b8a5d4ba9 (patch)
treec8bd2db077066764b8a7b874870022183fc650f8 /bfd/elf64-x86-64.c
parent528b42ae75c9f19f1bca1e109a7de13d89ba11b2 (diff)
downloadgdb-9d4b2dba0e5f61cbec871f70e0a20c4b8a5d4ba9.zip
gdb-9d4b2dba0e5f61cbec871f70e0a20c4b8a5d4ba9.tar.gz
gdb-9d4b2dba0e5f61cbec871f70e0a20c4b8a5d4ba9.tar.bz2
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/elf64-x86-64.c')
-rw-r--r--bfd/elf64-x86-64.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index a440647..ca9a45c 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -2917,15 +2917,10 @@ elf_x86_64_size_dynamic_sections (bfd *output_bfd,
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 refeence 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