Improve verbose message
[deliverable/binutils-gdb.git] / bfd / elf32-mcore.c
index b54974300cc5bb180a011c327534dd7947d9b873..99e9c73596e6a9b75da947294ffdb26455c60bf2 100644 (file)
@@ -237,7 +237,7 @@ mcore_elf_howto_init ()
 \f
 static reloc_howto_type *
 mcore_elf_reloc_type_lookup (abfd, code)
-     bfd * abfd;
+     bfd * abfd ATTRIBUTE_UNUSED;
      bfd_reloc_code_real_type code;
 {
   enum elf_mcore_reloc_type mcore_reloc = R_MCORE_NONE;
@@ -267,7 +267,7 @@ mcore_elf_reloc_type_lookup (abfd, code)
 /* Set the howto pointer for a RCE ELF reloc.  */
 static void
 mcore_elf_info_to_howto (abfd, cache_ptr, dst)
-     bfd * abfd;
+     bfd * abfd ATTRIBUTE_UNUSED;
      arelent * cache_ptr;
      Elf32_Internal_Rela * dst;
 {
@@ -322,18 +322,8 @@ mcore_elf_merge_private_bfd_data (ibfd, obfd)
   flagword new_flags;
 
   /* Check if we have the same endianess */
-  if (   ibfd->xvec->byteorder != obfd->xvec->byteorder
-      && obfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN)
-    {
-      (*_bfd_error_handler)
-       (_("%s: compiled for a %s endian system and target is %s endian.\n"),
-        bfd_get_filename (ibfd),
-         bfd_big_endian (ibfd) ? "big" : "little",
-         bfd_big_endian (obfd) ? "big" : "little");
-
-      bfd_set_error (bfd_error_wrong_format);
-      return false;
-    }
+  if (_bfd_generic_verify_endian_match (ibfd, obfd) == false)
+    return false;
 
   if (   bfd_get_flavour (ibfd) != bfd_target_elf_flavour
       || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
@@ -349,7 +339,11 @@ mcore_elf_merge_private_bfd_data (ibfd, obfd)
     }
   else if (new_flags == old_flags)     /* Compatible flags are ok */
     ;
-  
+  else
+    {
+      /* FIXME */
+    }
+
   return true;
 }
 
@@ -362,11 +356,11 @@ mcore_elf_unsupported_reloc (abfd, reloc_entry, symbol, data, input_section,
                           output_bfd, error_message)
      bfd * abfd;
      arelent * reloc_entry;
-     asymbol * symbol;
-     PTR data;
-     asection * input_section;
-     bfd * output_bfd;
-     char ** error_message;
+     asymbol * symbol ATTRIBUTE_UNUSED;
+     PTR data ATTRIBUTE_UNUSED;
+     asection * input_section ATTRIBUTE_UNUSED;
+     bfd * output_bfd ATTRIBUTE_UNUSED;
+     char ** error_message ATTRIBUTE_UNUSED;
 {
   BFD_ASSERT (reloc_entry->howto != (reloc_howto_type *)0);
   
@@ -411,7 +405,7 @@ mcore_elf_unsupported_reloc (abfd, reloc_entry, symbol, data, input_section,
 static boolean
 mcore_elf_relocate_section (output_bfd, info, input_bfd, input_section,
                          contents, relocs, local_syms, local_sections)
-     bfd * output_bfd;
+     bfd * output_bfd ATTRIBUTE_UNUSED;
      struct bfd_link_info * info;
      bfd * input_bfd;
      asection * input_section;
@@ -450,7 +444,7 @@ mcore_elf_relocate_section (output_bfd, info, input_bfd, input_section,
       Elf_Internal_Sym *           sym = (Elf_Internal_Sym *) 0;
       unsigned long                r_symndx;
       struct elf_link_hash_entry * h = (struct elf_link_hash_entry *) 0;
-      unsigned short               oldinst;
+      unsigned short               oldinst = 0;
       
       /* Unknown relocation handling */
       if ((unsigned) r_type >= (unsigned) R_MCORE_max
@@ -528,13 +522,14 @@ mcore_elf_relocate_section (output_bfd, info, input_bfd, input_section,
            }
          else if (h->root.type == bfd_link_hash_undefweak)
            relocation = 0;
-         else if (info->shared)
+         else if (info->shared
+                  && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
            relocation = 0;
          else
            {
              if (! ((*info->callbacks->undefined_symbol)
                        (info, h->root.root.string, input_bfd,
-                        input_section, rel->r_offset)))
+                        input_section, rel->r_offset, true)))
                return false;
 
              ret = false;
@@ -619,7 +614,7 @@ mcore_elf_relocate_section (output_bfd, info, input_bfd, input_section,
 static asection *
 mcore_elf_gc_mark_hook (abfd, info, rel, h, sym)
      bfd *                        abfd;
-     struct bfd_link_info *       info;
+     struct bfd_link_info *       info ATTRIBUTE_UNUSED;
      Elf_Internal_Rela *          rel;
      struct elf_link_hash_entry * h;
      Elf_Internal_Sym *           sym;
@@ -665,10 +660,10 @@ mcore_elf_gc_mark_hook (abfd, info, rel, h, sym)
 
 static boolean
 mcore_elf_gc_sweep_hook (abfd, info, sec, relocs)
-     bfd *                     abfd;
-     struct bfd_link_info *    info;
-     asection *                sec;
-     const Elf_Internal_Rela * relocs;
+     bfd *                     abfd ATTRIBUTE_UNUSED;
+     struct bfd_link_info *    info ATTRIBUTE_UNUSED;
+     asection *                sec ATTRIBUTE_UNUSED;
+     const Elf_Internal_Rela * relocs ATTRIBUTE_UNUSED;
 {
   return true;
 }
This page took 0.025188 seconds and 4 git commands to generate.