* elf32-m68hc11.c: Formatting fixes.
authorAlan Modra <amodra@gmail.com>
Thu, 22 Aug 2002 05:41:53 +0000 (05:41 +0000)
committerAlan Modra <amodra@gmail.com>
Thu, 22 Aug 2002 05:41:53 +0000 (05:41 +0000)
(elf32_m68hc11_gc_mark_hook): Correct params.  Remove unnecessary test.
* elf32-m68hc12.c: Formatting fixes.
(elf32_m68hc11_gc_mark_hook): Correct params.  Remove unnecessary test.

bfd/ChangeLog
bfd/elf32-m68hc11.c
bfd/elf32-m68hc12.c

index 0cec092d3b3bfd3c6aaf91f91ac22575cde3b4e2..d9fef30273302d4abd818a5876262a6db8e360b9 100644 (file)
@@ -1,3 +1,10 @@
+2002-08-22  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf32-m68hc11.c: Formatting fixes.
+       (elf32_m68hc11_gc_mark_hook): Correct params.  Remove unnecessary test.
+       * elf32-m68hc12.c: Formatting fixes.
+       (elf32_m68hc11_gc_mark_hook): Correct params.  Remove unnecessary test.
+
 2002-08-22  Alan Modra  <amodra@bigpond.net.au>
 
        * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
@@ -6,6 +13,8 @@
        * coff64-rs6000.c (rs6000coff64_vec): Likewise.
        (aix5coff64_vec): Likewise.
 
+2002-08-22  Alan Modra  <amodra@bigpond.net.au>
+
        * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
        param to elf_backend_copy_indirect_symbol.
        (_bfd_elf_link_hash_copy_indirect): Likewise.
index 2663f5f6f4e46c0b4388aaa55259abb2151ee68f..f189be898cef6440d2a996e4fa6d96e5a3606f76 100644 (file)
@@ -27,44 +27,39 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "elf/m68hc11.h"
 
 static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup
-PARAMS ((bfd * abfd, bfd_reloc_code_real_type code));
+  PARAMS ((bfd *, bfd_reloc_code_real_type));
 static void m68hc11_info_to_howto_rel
-PARAMS ((bfd *, arelent *, Elf32_Internal_Rel *));
+  PARAMS ((bfd *, arelent *, Elf32_Internal_Rel *));
 
 static bfd_reloc_status_type m68hc11_elf_ignore_reloc
-PARAMS ((bfd *abfd, arelent *reloc_entry,
-         asymbol *symbol, PTR data, asection *input_section,
-         bfd *output_bfd, char **error_message));
+  PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
 
 /* GC mark and sweep.  */
 static asection *elf32_m68hc11_gc_mark_hook
-PARAMS ((bfd *abfd, struct bfd_link_info *info,
-         Elf_Internal_Rela *rel, struct elf_link_hash_entry *h,
-         Elf_Internal_Sym *sym));
+  PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
+          struct elf_link_hash_entry *, Elf_Internal_Sym *));
 static boolean elf32_m68hc11_gc_sweep_hook
-PARAMS ((bfd *abfd, struct bfd_link_info *info,
-         asection *sec, const Elf_Internal_Rela *relocs));
+  PARAMS ((bfd *, struct bfd_link_info *, asection *,
+          const Elf_Internal_Rela *));
 static boolean elf32_m68hc11_check_relocs
-PARAMS ((bfd * abfd, struct bfd_link_info * info,
-         asection * sec, const Elf_Internal_Rela * relocs));
+  PARAMS ((bfd *, struct bfd_link_info *, asection *,
+          const Elf_Internal_Rela *));
 static boolean elf32_m68hc11_relocate_section
-PARAMS ((bfd *output_bfd, struct bfd_link_info *info,
-         bfd *input_bfd, asection *input_section,
-         bfd_byte *contents, Elf_Internal_Rela *relocs,
-         Elf_Internal_Sym *local_syms, asection **local_sections));
+  PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+          Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
 static boolean m68hc11_elf_relax_section
   PARAMS ((bfd *, asection *, struct bfd_link_info *, boolean *));
 static void m68hc11_elf_relax_delete_bytes
-PARAMS ((bfd *abfd, asection *sec, bfd_vma addr, int count));
+  PARAMS ((bfd *, asection *, bfd_vma, int));
 static void m68hc11_relax_group
-PARAMS ((bfd *abfd, asection *sec, bfd_byte *contents,
-         unsigned value, unsigned long offset, unsigned long end_group));
-static int compare_reloc PARAMS ((const void*, const void*));
+  PARAMS ((bfd *, asection *, bfd_byte *, unsigned,
+          unsigned long, unsigned long));
+static int compare_reloc PARAMS ((const void *, const void *));
 
 
-boolean _bfd_m68hc11_elf_merge_private_bfd_data PARAMS ((bfd*, bfd*));
-boolean _bfd_m68hc11_elf_set_private_flags PARAMS ((bfd*, flagword));
-boolean _bfd_m68hc11_elf_print_private_bfd_data PARAMS ((bfd*, PTR));
+boolean _bfd_m68hc11_elf_merge_private_bfd_data PARAMS ((bfd *, bfd *));
+boolean _bfd_m68hc11_elf_set_private_flags PARAMS ((bfd *, flagword));
+boolean _bfd_m68hc11_elf_print_private_bfd_data PARAMS ((bfd *, PTR));
 
 /* Use REL instead of RELA to save space */
 #define USE_REL
@@ -407,8 +402,8 @@ m68hc11_info_to_howto_rel (abfd, cache_ptr, dst)
 }
 
 static asection *
-elf32_m68hc11_gc_mark_hook (abfd, info, rel, h, sym)
-     bfd *abfd;
+elf32_m68hc11_gc_mark_hook (sec, info, rel, h, sym)
+     asection *sec;
      struct bfd_link_info *info ATTRIBUTE_UNUSED;
      Elf_Internal_Rela *rel;
      struct elf_link_hash_entry *h;
@@ -434,15 +429,8 @@ elf32_m68hc11_gc_mark_hook (abfd, info, rel, h, sym)
        }
     }
   else
-    {
-      if (!(elf_bad_symtab (abfd)
-           && ELF_ST_BIND (sym->st_info) != STB_LOCAL)
-         && !((sym->st_shndx <= 0 || sym->st_shndx >= SHN_LORESERVE)
-              && sym->st_shndx != SHN_COMMON))
-       {
-         return bfd_section_from_elf_index (abfd, sym->st_shndx);
-       }
-    }
+    return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+
   return NULL;
 }
 
index 907159b01319b25f8772ad089b906adeffa0a489..9ab8780574c86c9c479072cb8a488f7e754eecac 100644 (file)
@@ -27,14 +27,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "opcode/m68hc11.h"
 
 static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup
-PARAMS ((bfd * abfd, bfd_reloc_code_real_type code));
+  PARAMS ((bfd *, bfd_reloc_code_real_type));
 static void m68hc11_info_to_howto_rel
-PARAMS ((bfd *, arelent *, Elf32_Internal_Rel *));
+  PARAMS ((bfd *, arelent *, Elf32_Internal_Rel *));
 
 static bfd_reloc_status_type m68hc11_elf_ignore_reloc
-PARAMS ((bfd *abfd, arelent *reloc_entry,
-         asymbol *symbol, PTR data, asection *input_section,
-         bfd *output_bfd, char **error_message));
+  PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
 static bfd_reloc_status_type m68hc12_elf_special_reloc
   PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
 static int m68hc12_addr_is_banked PARAMS ((bfd_vma));
@@ -43,16 +41,15 @@ static bfd_vma m68hc12_phys_page PARAMS ((bfd_vma));
 
 /* GC mark and sweep.  */
 static asection *elf32_m68hc11_gc_mark_hook
-PARAMS ((bfd *abfd, struct bfd_link_info *info,
-         Elf_Internal_Rela *rel, struct elf_link_hash_entry *h,
-         Elf_Internal_Sym *sym));
+  PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
+          struct elf_link_hash_entry *, Elf_Internal_Sym *));
 static boolean elf32_m68hc11_gc_sweep_hook
-PARAMS ((bfd *abfd, struct bfd_link_info *info,
-         asection *sec, const Elf_Internal_Rela *relocs));
+  PARAMS ((bfd *, struct bfd_link_info *, asection *,
+          const Elf_Internal_Rela *));
 
-boolean _bfd_m68hc12_elf_merge_private_bfd_data PARAMS ((bfd*, bfd*));
-boolean _bfd_m68hc12_elf_set_private_flags PARAMS ((bfd*, flagword));
-boolean _bfd_m68hc12_elf_print_private_bfd_data PARAMS ((bfd*, PTR));
+boolean _bfd_m68hc12_elf_merge_private_bfd_data PARAMS ((bfd *, bfd *));
+boolean _bfd_m68hc12_elf_set_private_flags PARAMS ((bfd *, flagword));
+boolean _bfd_m68hc12_elf_print_private_bfd_data PARAMS ((bfd *, PTR));
 
 
 
@@ -592,8 +589,8 @@ m68hc11_info_to_howto_rel (abfd, cache_ptr, dst)
 }
 
 static asection *
-elf32_m68hc11_gc_mark_hook (abfd, info, rel, h, sym)
-     bfd *abfd;
+elf32_m68hc11_gc_mark_hook (sec, info, rel, h, sym)
+     asection *sec;
      struct bfd_link_info *info ATTRIBUTE_UNUSED;
      Elf_Internal_Rela *rel;
      struct elf_link_hash_entry *h;
@@ -619,15 +616,8 @@ elf32_m68hc11_gc_mark_hook (abfd, info, rel, h, sym)
        }
     }
   else
-    {
-      if (!(elf_bad_symtab (abfd)
-           && ELF_ST_BIND (sym->st_info) != STB_LOCAL)
-         && !((sym->st_shndx <= 0 || sym->st_shndx >= SHN_LORESERVE)
-              && sym->st_shndx != SHN_COMMON))
-       {
-         return bfd_section_from_elf_index (abfd, sym->st_shndx);
-       }
-    }
+    return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+
   return NULL;
 }
 
This page took 0.032122 seconds and 4 git commands to generate.