* elf-bfd.h (struct elf_backend_data): New function pointer member
authorKaz Kojima <kkojima@rr.iij4u.or.jp>
Tue, 14 Oct 2003 22:43:10 +0000 (22:43 +0000)
committerKaz Kojima <kkojima@rr.iij4u.or.jp>
Tue, 14 Oct 2003 22:43:10 +0000 (22:43 +0000)
elf_backend_merge_symbol_attribute.
* elflink.h (elf_link_add_object_symbols): Adjust call to
elf_backend_merge_symbol_attribute if the backend defined it.
        * elfxx-target.h (elf_backend_merge_symbol_attribute): New macro.
        (elfNN_bed): Add that to the initializer.

bfd/ChangeLog
bfd/elf-bfd.h
bfd/elflink.h
bfd/elfxx-target.h

index 235bc66655350e54f5bba0236da2b2aef481e184..d41c0a611c8d57426e2b2a7f0307095887d1e2f1 100644 (file)
@@ -1,3 +1,12 @@
+2003-10-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
+
+       * elf-bfd.h (struct elf_backend_data): New function pointer member
+       elf_backend_merge_symbol_attribute.
+       * elflink.h (elf_link_add_object_symbols): Adjust call to
+       elf_backend_merge_symbol_attribute if the backend defined it.
+        * elfxx-target.h (elf_backend_merge_symbol_attribute): New macro.
+        (elfNN_bed): Add that to the initializer.
+
 2003-10-14  Bob Wilson  <bob.wilson@acm.org>
 
        * elf32-xtensa.c (get_is_linkonce_section): Delete.
index 99036949adf5f6973543b708fb6a3b79f6527375..bf73762ada21dbb417a4162bd92510796a27bccf 100644 (file)
@@ -813,6 +813,11 @@ struct elf_backend_data
   void (*elf_backend_hide_symbol)
     (struct bfd_link_info *, struct elf_link_hash_entry *, bfd_boolean);
 
+  /* Merge the backend specific symbol attribute.  */
+  void (*elf_backend_merge_symbol_attribute)
+    (struct elf_link_hash_entry *, const Elf_Internal_Sym *, bfd_boolean,
+     bfd_boolean);
+
   /* Emit relocations.  Overrides default routine for emitting relocs,
      except during a relocatable link, or if all relocs are being emitted.  */
   bfd_boolean (*elf_backend_emit_relocs)
index bd94cbf4fc416aa39ebc99b2dbaa48717efc134c..71fdbaa3030b9117b502db17380d0aef992e6275 100644 (file)
@@ -1261,6 +1261,10 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
          /* If st_other has a processor-specific meaning, specific
             code might be needed here. We never merge the visibility
             attribute with the one from a dynamic object.  */
+         if (bed->elf_backend_merge_symbol_attribute)
+           (*bed->elf_backend_merge_symbol_attribute) (h, isym, definition,
+                                                       dynamic);
+
          if (isym->st_other != 0 && !dynamic)
            {
              unsigned char hvis, symvis, other, nvis;
index 544f8f3647861aea7b03a8e8a9ab43a147c81f16..2d1e5e2572607ca67aecbe458c2cd04fa66663c6 100644 (file)
 #ifndef elf_backend_hide_symbol
 #define elf_backend_hide_symbol                _bfd_elf_link_hash_hide_symbol
 #endif
+#ifndef elf_backend_merge_symbol_attribute
+#define elf_backend_merge_symbol_attribute     NULL
+#endif
 #ifndef elf_backend_emit_relocs
 #define elf_backend_emit_relocs                        NULL
 #endif
@@ -483,6 +486,7 @@ static const struct elf_backend_data elfNN_bed =
   elf_backend_output_arch_syms,
   elf_backend_copy_indirect_symbol,
   elf_backend_hide_symbol,
+  elf_backend_merge_symbol_attribute,
   elf_backend_emit_relocs,
   elf_backend_count_relocs,
   elf_backend_grok_prstatus,