diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2013-02-08 01:33:01 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2013-02-08 01:33:01 +0000 |
commit | 02acbe2250b647ae693a88fa30056f80aee514d9 (patch) | |
tree | 264575e9da3e20407f3187303431aa0e733c2749 /bfd | |
parent | aaa42e10ef1e438542a4bf24bd945d11a6059bb2 (diff) | |
download | gdb-02acbe2250b647ae693a88fa30056f80aee514d9.zip gdb-02acbe2250b647ae693a88fa30056f80aee514d9.tar.gz gdb-02acbe2250b647ae693a88fa30056f80aee514d9.tar.bz2 |
Set STB_GNU_UNIQUE only if symbol is defined in regular object
bfd/
PR ld/15107
* elflink.c (elf_link_output_extsym): Set STB_GNU_UNIQUE only if
symbol is defined in regular object.
ld/testsuite/
PR ld/15107
* ld-unique/unique_empty.s: Add reference to "b".
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elflink.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index c652c35..4c93611 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2013-02-07 H.J. Lu <hongjiu.lu@intel.com> + + PR ld/15107 + * elflink.c (elf_link_output_extsym): Set STB_GNU_UNIQUE only if + symbol is defined in regular object. + 2013-02-07 Roberto Agostino Vitillo <ra.vitillo@gmail.com> PR binutils/15106 diff --git a/bfd/elflink.c b/bfd/elflink.c index d336730..e6c8351 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -8868,7 +8868,8 @@ elf_link_output_extsym (struct bfd_hash_entry *bh, void *data) /* Turn off visibility on local symbol. */ sym.st_other &= ~ELF_ST_VISIBILITY (-1); } - else if (h->unique_global) + /* Set STB_GNU_UNIQUE only if symbol is defined in regular object. */ + else if (h->unique_global && h->def_regular) sym.st_info = ELF_ST_INFO (STB_GNU_UNIQUE, h->type); else if (h->root.type == bfd_link_hash_undefweak || h->root.type == bfd_link_hash_defweak) |