aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfxx-x86.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elfxx-x86.c')
-rw-r--r--bfd/elfxx-x86.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c
index dbda542..b0eb1c8 100644
--- a/bfd/elfxx-x86.c
+++ b/bfd/elfxx-x86.c
@@ -1098,7 +1098,8 @@ _bfd_x86_elf_size_dynamic_sections (bfd *output_bfd,
|| htab->elf.igotplt->size == 0))
{
htab->elf.sgotplt->size = 0;
- if (htab->elf.hgot != NULL)
+ if (htab->elf.hgot != NULL
+ && !htab->need_global_offset_table)
{
/* Remove the unused _GLOBAL_OFFSET_TABLE_ from symbol
table. */
@@ -2463,6 +2464,7 @@ error_alignment:
return pbfd;
htab->plt0_pad_byte = init_table->plt0_pad_byte;
+ htab->need_global_offset_table = init_table->need_global_offset_table;
use_ibt_plt = info->ibtplt || info->ibt;
if (!use_ibt_plt && pbfd != NULL)