diff options
author | H.J. Lu <hjl@lucon.org> | 2003-03-29 01:26:33 +0000 |
---|---|---|
committer | H.J. Lu <hjl@lucon.org> | 2003-03-29 01:26:33 +0000 |
commit | dce6ea1b2b1a708b9fa0dde826c8f70ee192fc6c (patch) | |
tree | b06fce5316a97bb52e99a247bdbe57d95271fcf1 | |
parent | 8a611e042c5b4c3f89a9e29eeda2dc71d85d1d64 (diff) | |
download | binutils-redhat-dce6ea1b2b1a708b9fa0dde826c8f70ee192fc6c.tar.gz |
2003-03-28 H.J. Lu <hjl@gnu.org>
* elflink.h (elf_link_add_object_symbols): Correctly combine
visibilities.
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elflink.h | 10 |
2 files changed, 13 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 90791379cd..5d387c0615 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2003-03-28 H.J. Lu <hjl@gnu.org> + + * elflink.h (elf_link_add_object_symbols): Correctly combine + visibilities. + 2003-03-27 Jakub Jelinek <jakub@redhat.com> * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset diff --git a/bfd/elflink.h b/bfd/elflink.h index c39120d037..3af34ee284 100644 --- a/bfd/elflink.h +++ b/bfd/elflink.h @@ -1940,7 +1940,7 @@ elf_link_add_object_symbols (abfd, info) might be needed here. */ if (isym->st_other != 0) { - unsigned char hvis, symvis, other; + unsigned char hvis, symvis, other, nvis; /* Take the balance of OTHER from the definition. */ other = (definition ? isym->st_other : h->other); @@ -1949,8 +1949,14 @@ elf_link_add_object_symbols (abfd, info) /* Combine visibilities, using the most constraining one. */ hvis = ELF_ST_VISIBILITY (h->other); symvis = ELF_ST_VISIBILITY (isym->st_other); + if (! hvis) + nvis = symvis; + else if (! symvis) + nvis = hvis; + else + nvis = hvis < symvis ? hvis : symvis; - h->other = other | (hvis > symvis ? hvis : symvis); + h->other = other | nvis; } /* Set a flag in the hash table entry indicating the type of |