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 | 8992f0d7c2d63ad6b5c102572be103791c6a958e (patch) | |
tree | 418e1f446655641788c67b0cfda3bd8a363ee07f /bfd/elfxx-mips.c | |
parent | 4be041b2dbd0436dd8d96217ce9e6723ce12f1d2 (diff) | |
download | gdb-8992f0d7c2d63ad6b5c102572be103791c6a958e.zip gdb-8992f0d7c2d63ad6b5c102572be103791c6a958e.tar.gz gdb-8992f0d7c2d63ad6b5c102572be103791c6a958e.tar.bz2 |
* 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 8ebd2f9..cdc81a2 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; } |