diff options
author | Thiemo Seufer <ths@networkno.de> | 2006-08-15 18:28:48 +0000 |
---|---|---|
committer | Thiemo Seufer <ths@networkno.de> | 2006-08-15 18:28:48 +0000 |
commit | b0195be02a7a4ca23f5c20e856e22d05dd9739cc (patch) | |
tree | a77213727861f3b42358c47307baf078d2257392 /bfd/elfxx-mips.c | |
parent | 88adc65e94faef0ae2090e2a1288fe10ed2e69f5 (diff) | |
download | binutils-redhat-b0195be02a7a4ca23f5c20e856e22d05dd9739cc.tar.gz |
* elf32-mips.c, elf64-mips.c, elfn32-mips.c
(elf_backend_merge_symbol_attribute): Define.
* elflink.c (elf_link_add_object_symbols): Merge only the ELF
visibility flags.
* elfxx-mips.c (_bfd_mips_elf_merge_symbol_attribute): New function.
Diffstat (limited to 'bfd/elfxx-mips.c')
-rw-r--r-- | bfd/elfxx-mips.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index 8ebd2f9450..cdc81a229d 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -11115,15 +11115,25 @@ const struct bfd_elf_special_section _bfd_mips_elf_special_sections[] = { NULL, 0, 0, 0, 0 } }; -/* Ensure that the STO_OPTIONAL flag is copied into h->other, - even if this is not a defintion of the symbol. */ +/* Merge non visibility st_other attributes. Ensure that the + STO_OPTIONAL flag is copied into h->other, even if this is not a + definiton of the symbol. */ void _bfd_mips_elf_merge_symbol_attribute (struct elf_link_hash_entry *h, const Elf_Internal_Sym *isym, bfd_boolean definition, bfd_boolean dynamic ATTRIBUTE_UNUSED) { - if (! definition + if ((isym->st_other & ~ELF_ST_VISIBILITY (-1)) != 0) + { + unsigned char other; + + other = (definition ? isym->st_other : h->other); + other &= ~ELF_ST_VISIBILITY (-1); + h->other = other | ELF_ST_VISIBILITY (h->other); + } + + if (!definition && ELF_MIPS_IS_OPTIONAL (isym->st_other)) h->other |= STO_OPTIONAL; } |