summaryrefslogtreecommitdiff
path: root/bfd/elf64-ia64-vms.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2013-02-22 01:20:47 +0000
committerH.J. Lu <hjl.tools@gmail.com>2013-02-22 01:20:47 +0000
commit1ebfde4a1be259ff228f041c4e4e3f6de1522bf8 (patch)
tree9fed48b65e5f9d2934b549ceba971ccae962a6c9 /bfd/elf64-ia64-vms.c
parent16d97e94f9345710c2a614c047172d4c8cb17057 (diff)
downloadbinutils-redhat-1ebfde4a1be259ff228f041c4e4e3f6de1522bf8.tar.gz
Set unique_global only for definition
bfd/ PR ld/15167 * elf64-ia64-vms.c (elf64_vms_link_add_object_symbols): Set unique_global only for definition. * elflink.c (_bfd_elf_merge_symbol): Don't set unique_global here. (elf_link_add_object_symbols): Set unique_global only for definition. ld/testsuite/ PR ld/15167 * ld-unique/unique.exp: Add a test for shared library with reference.
Diffstat (limited to 'bfd/elf64-ia64-vms.c')
-rw-r--r--bfd/elf64-ia64-vms.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elf64-ia64-vms.c b/bfd/elf64-ia64-vms.c
index 6747e0c6e2..82fd646947 100644
--- a/bfd/elf64-ia64-vms.c
+++ b/bfd/elf64-ia64-vms.c
@@ -5046,7 +5046,8 @@ error_free_dyn:
h = (struct elf_link_hash_entry *) h->root.u.i.link;
*sym_hash = h;
- h->unique_global = (flags & BSF_GNU_UNIQUE) != 0;
+ if (definition)
+ h->unique_global = (flags & BSF_GNU_UNIQUE) != 0;
/* Set the alignment of a common symbol. */
if ((common || bfd_is_com_section (sec))