Check the correct arch_info object's mach field: all PowerPC machines are
[deliverable/binutils-gdb.git] / bfd / elf32-sh64.c
index 288003e0660410b911ace44f7e30cc00d969bbfd..c3be09f6507ea4139626c50e8b806efa9ff6ae4e 100644 (file)
@@ -85,6 +85,7 @@ static void sh64_find_section_for_address
 #define elf_backend_add_symbol_hook            sh64_elf_add_symbol_hook
 #define elf_backend_link_output_symbol_hook \
        sh64_elf_link_output_symbol_hook
+#define elf_backend_merge_symbol_attribute     sh64_elf_merge_symbol_attribute
 #define elf_backend_final_write_processing     sh64_elf_final_write_processing
 #define elf_backend_section_from_shdr          sh64_backend_section_from_shdr
 #define elf_backend_special_sections           sh64_elf_special_sections
@@ -735,6 +736,27 @@ sh64_elf_final_write_processing (bfd *abfd,
     }
 }
 
+/* Merge non visibility st_other attribute when the symbol comes from
+   a dynamic object.  */
+static void
+sh64_elf_merge_symbol_attribute (struct elf_link_hash_entry *h,
+                                const Elf_Internal_Sym *isym,
+                                bfd_boolean definition,
+                                bfd_boolean dynamic)
+{
+  if (isym->st_other != 0 && dynamic)
+    {
+      unsigned char other;
+
+      /* Take the balance of OTHER from the definition.  */
+      other = (definition ? isym->st_other : h->other);
+      other &= ~ ELF_ST_VISIBILITY (-1);
+      h->other = other | ELF_ST_VISIBILITY (h->other);
+    }
+
+  return;
+}
+
 static struct bfd_elf_special_section const sh64_elf_special_sections[]=
 {
   { ".cranges", 8, 0, SHT_PROGBITS, 0 },
This page took 0.025743 seconds and 4 git commands to generate.