summaryrefslogtreecommitdiff
path: root/bfd/elf64-sparc.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@libertysurf.fr>2005-01-10 11:23:01 +0000
committerEric Botcazou <ebotcazou@libertysurf.fr>2005-01-10 11:23:01 +0000
commitf46da7c7cdb000b0312296b221df593ad4cd3f02 (patch)
tree56367c200641dcbf580140fb4483c223a174c9b8 /bfd/elf64-sparc.c
parent3e41d7b0634f8a0f58d7ef6109bc67bc121560c2 (diff)
downloadbinutils-redhat-f46da7c7cdb000b0312296b221df593ad4cd3f02.tar.gz
* elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
non-shared object, do not reserve space in .plt and .rela.plt for regular symbols neither defined nor referenced in shared objects.
Diffstat (limited to 'bfd/elf64-sparc.c')
-rw-r--r--bfd/elf64-sparc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/bfd/elf64-sparc.c b/bfd/elf64-sparc.c
index 62fb524e58..1b2835cc02 100644
--- a/bfd/elf64-sparc.c
+++ b/bfd/elf64-sparc.c
@@ -1680,7 +1680,11 @@ sparc64_elf_adjust_dynamic_symbol (info, h)
|| h->root.type == bfd_link_hash_defweak)
&& (h->root.u.def.section->flags & SEC_CODE) != 0))
{
- if (! elf_hash_table (info)->dynamic_sections_created)
+ if (! info->shared
+ && !h->def_dynamic
+ && !h->ref_dynamic
+ && h->root.type != bfd_link_hash_undefweak
+ && h->root.type != bfd_link_hash_undefined)
{
/* This case can occur if we saw a WPLT30 reloc in an input
file, but none of the input files were dynamic objects.