aboutsummaryrefslogtreecommitdiff
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
commit669460c7e67689e5cd066f5133c3e79a35c12492 (patch)
treeb2b537ee8c5162f7e9597a6c45064b32492177e8
parent0bcb06d2f206b920aed12619c82f6e311ecacce2 (diff)
downloadgdb-669460c7e67689e5cd066f5133c3e79a35c12492.zip
gdb-669460c7e67689e5cd066f5133c3e79a35c12492.tar.gz
gdb-669460c7e67689e5cd066f5133c3e79a35c12492.tar.bz2
* 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.
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf64-sparc.c6
2 files changed, 11 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 04894f0..1cff339 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2005-01-10 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ * 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.
+
2005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
* elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc
diff --git a/bfd/elf64-sparc.c b/bfd/elf64-sparc.c
index 62fb524..1b2835c 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.