mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-03 04:12:10 +08:00
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".
This commit is contained in:
parent
aaa42e10ef
commit
02acbe2250
@ -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
|
||||
|
@ -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)
|
||||
|
@ -1,3 +1,8 @@
|
||||
2013-02-07 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR ld/15107
|
||||
* ld-unique/unique_empty.s: Add reference to "b".
|
||||
|
||||
2013-02-06 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* ld-size/size-10.rd: Updated.
|
||||
|
@ -1,4 +1,4 @@
|
||||
.type main,"function"
|
||||
.global main
|
||||
main:
|
||||
.long 0
|
||||
.dc.a b
|
||||
|
Loading…
Reference in New Issue
Block a user