* config/obj-elf.c (elf_copy_symbol_attributes): Don't copy
authorJakub Jelinek <jakub@redhat.com>
Fri, 1 Mar 2002 18:36:08 +0000 (18:36 +0000)
committerJakub Jelinek <jakub@redhat.com>
Fri, 1 Mar 2002 18:36:08 +0000 (18:36 +0000)
visibility.
(obj_frob_symbol): Copy visibility.

gas/ChangeLog
gas/config/obj-elf.c

index 3651d2b695f3aeec903af41b90de37214cddd07e..4eea4919e835a0b0a9b1135a20f0027b5c80e376 100644 (file)
@@ -1,3 +1,9 @@
+2002-03-01  Jakub Jelinek  <jakub@redhat.com>
+
+       * config/obj-elf.c (elf_copy_symbol_attributes): Don't copy
+       visibility.
+       (obj_frob_symbol): Copy visibility.
+
 2002-02-28  Jakub Jelinek  <jakub@redhat.com>
 
        * config/tc-alpha.c (s_alpha_text): Use obj_elf_text for OBJ_ELF, not
index 13c748211c499c21c6d3f9b74ea0a04bff9094f1..dcbff5d8a213c0d35bb780c142fe9c40593bca89 100644 (file)
@@ -1408,7 +1408,9 @@ elf_copy_symbol_attributes (dest, src)
       destelf->size = NULL;
     }
   S_SET_SIZE (dest, S_GET_SIZE (src));
-  S_SET_OTHER (dest, S_GET_OTHER (src));
+  /* Don't copy visibility.  */
+  S_SET_OTHER (dest, (ELF_ST_VISIBILITY (S_GET_OTHER (dest))
+                     | (S_GET_OTHER (src) & ~ELF_ST_VISIBILITY (-1))));
 }
 
 void
@@ -1839,6 +1841,8 @@ elf_frob_symbol (symp, puntp)
              /* This will copy over the size information.  */
              copy_symbol_attributes (symp2, symp);
 
+             S_SET_OTHER (symp2, S_GET_OTHER (symp));
+
              if (S_IS_WEAK (symp))
                S_SET_WEAK (symp2);