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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c
index b0eb1c8..fc08d1b 100644
--- a/bfd/elfxx-x86.c
+++ b/bfd/elfxx-x86.c
@@ -1098,8 +1098,9 @@ _bfd_x86_elf_size_dynamic_sections (bfd *output_bfd,
|| htab->elf.igotplt->size == 0))
{
htab->elf.sgotplt->size = 0;
- if (htab->elf.hgot != NULL
- && !htab->need_global_offset_table)
+ /* Solaris requires to keep _GLOBAL_OFFSET_TABLE_ even if it
+ isn't used. */
+ if (htab->elf.hgot != NULL && htab->target_os != is_solaris)
{
/* Remove the unused _GLOBAL_OFFSET_TABLE_ from symbol
table. */
@@ -2464,7 +2465,6 @@ 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)