summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorskrll <skrll@NetBSD.org>2005-01-13 07:55:31 +0000
committerskrll <skrll@NetBSD.org>2005-01-13 07:55:31 +0000
commit7b41d8016a7477fbfb8fe415ff7c455edc29b83d (patch)
treed7fa0b423874c2287c0606efdbe1749700682ba6 /gnu
parent368cef3ad761d9ff93134442868ae7ae677957ef (diff)
Backport a change from binutils-current
* 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. This fixes firefox for Havard
Diffstat (limited to 'gnu')
-rw-r--r--gnu/dist/binutils/bfd/ChangeLog6
-rw-r--r--gnu/dist/binutils/bfd/elf64-sparc.c6
2 files changed, 11 insertions, 1 deletions
diff --git a/gnu/dist/binutils/bfd/ChangeLog b/gnu/dist/binutils/bfd/ChangeLog
index 97361e7414e..e7d5b384ec2 100644
--- a/gnu/dist/binutils/bfd/ChangeLog
+++ b/gnu/dist/binutils/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.
+
2004-05-17 Daniel Jacobowitz <dan@debian.org>
* configure.in: Bump version to 2.15. Mark as released.
diff --git a/gnu/dist/binutils/bfd/elf64-sparc.c b/gnu/dist/binutils/bfd/elf64-sparc.c
index 8670aca1223..ea358916a95 100644
--- a/gnu/dist/binutils/bfd/elf64-sparc.c
+++ b/gnu/dist/binutils/bfd/elf64-sparc.c
@@ -1638,7 +1638,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->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0
+ && 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.