summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl@lucon.org>2003-05-20 14:35:00 +0000
committerH.J. Lu <hjl@lucon.org>2003-05-20 14:35:00 +0000
commit49541b0a76e5af86bb2bd4b112ff58acab895bf3 (patch)
treeff800d776690e3f238848aba520436fbd155c89b
parentbc716fce3ae6a5be562ec4e85c0971a891ec6f83 (diff)
downloadgdb-49541b0a76e5af86bb2bd4b112ff58acab895bf3.tar.gz
bfd/
2003-05-20 Jakub Jelinek <jakub@redhat.com> * elflink.h (elf_link_output_extsym): Only issue error about != STV_DEFAULT symbols if they are bfd_link_hash_undefined. 2003-05-20 H.J. Lu <hongjiu.lu@intel.com> * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF when removing the old definition for symbols with non-default visibility. ld/testsuite/ 2003-05-20 Jakub Jelinek <jakub@redhat.com> * ld-elfvsb/common.c: New file. * ld-elfvsb/elfvsb.exp: Add common. 2003-05-20 H.J. Lu <hongjiu.lu@intel.com> * ld-elfvsb/sh3.c: New file. * ld-elfvsb/test.c: Likewise. * ld-elfvsb/elfvsb.exp: Add new weak hidden symbol tests.
-rw-r--r--bfd/ChangeLog11
-rw-r--r--bfd/elflink.c3
-rw-r--r--bfd/elflink.h2
3 files changed, 14 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 646cdd5559b..87117efe4b2 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,14 @@
+2003-05-20 Jakub Jelinek <jakub@redhat.com>
+
+ * elflink.h (elf_link_output_extsym): Only issue error about !=
+ STV_DEFAULT symbols if they are bfd_link_hash_undefined.
+
+2003-05-20 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
+ when removing the old definition for symbols with non-default
+ visibility.
+
2003-05-18 Jason Eckhardt <jle@rice.edu>
* elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 3b0d3531f2d..cc311863e1a 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -884,7 +884,8 @@ _bfd_elf_merge_symbol (abfd, info, name, sym, psec, pvalue, sym_hash, skip,
if (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC)
{
h->elf_link_hash_flags &= ~ELF_LINK_HASH_DEF_DYNAMIC;
- h->elf_link_hash_flags |= ELF_LINK_HASH_REF_DYNAMIC;
+ h->elf_link_hash_flags |= (ELF_LINK_HASH_REF_DYNAMIC
+ | ELF_LINK_DYNAMIC_DEF);
}
/* FIXME: Should we check type and size for protected symbol? */
h->size = 0;
diff --git a/bfd/elflink.h b/bfd/elflink.h
index ab8c7dec3b4..7b32491d945 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -4622,7 +4622,7 @@ elf_link_output_extsym (h, data)
if (! finfo->info->relocateable
&& ELF_ST_VISIBILITY (sym.st_other) != STV_DEFAULT
&& ELF_ST_BIND (sym.st_info) != STB_WEAK
- && h->root.type != bfd_link_hash_undefweak
+ && h->root.type == bfd_link_hash_undefined
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
{
(*_bfd_error_handler)