aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1996-10-08 18:50:59 +0000
committerIan Lance Taylor <ian@airs.com>1996-10-08 18:50:59 +0000
commit1c4794f58f892986b25fcf390c4e967bda6e19fa (patch)
tree5662ee6c8c7ffb75ac5387e38b284b458215e141 /bfd
parentb560034fab29939f9188e9ee5b1b723616995c99 (diff)
downloadgdb-1c4794f58f892986b25fcf390c4e967bda6e19fa.zip
gdb-1c4794f58f892986b25fcf390c4e967bda6e19fa.tar.gz
gdb-1c4794f58f892986b25fcf390c4e967bda6e19fa.tar.bz2
* elflink.h (elf_link_add_object_symbols): If a symbol is a weak
definition in a dynamic object, add it to the dynamic symbol table if any dynamic object mentions it. Reverts part of last patch. PR 10827.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog4
-rw-r--r--bfd/elflink.h5
2 files changed, 8 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index e05cd4c..1b0f8d0 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -5,6 +5,10 @@ Tue Oct 8 08:51:19 1996 Stu Grossman (grossman@critters.cygnus.com)
Tue Oct 8 11:40:16 1996 Ian Lance Taylor <ian@cygnus.com>
+ * elflink.h (elf_link_add_object_symbols): If a symbol is a weak
+ definition in a dynamic object, add it to the dynamic symbol table
+ if any dynamic object mentions it. Reverts part of last patch.
+
* sunos.c (struct sunos_link_hash_table): Add got_base field.
(sunos_link_hash_table_create): Initialize got_base.
(bfd_sunos_size_dynamic_sections): If the .got section is more
diff --git a/bfd/elflink.h b/bfd/elflink.h
index dae7597..dcc5827 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -828,7 +828,10 @@ elf_link_add_object_symbols (abfd, info)
else
new_flag = ELF_LINK_HASH_DEF_DYNAMIC;
if ((old_flags & (ELF_LINK_HASH_DEF_REGULAR
- | ELF_LINK_HASH_REF_REGULAR)) != 0)
+ | ELF_LINK_HASH_REF_REGULAR)) != 0
+ || (h->weakdef != NULL
+ && (old_flags & (ELF_LINK_HASH_DEF_DYNAMIC
+ | ELF_LINK_HASH_REF_DYNAMIC)) != 0))
dynsym = true;
}