2001-08-29 Joel Sherrill <joel@OARcorp.com>
[deliverable/binutils-gdb.git] / bfd / hp300hpux.c
index 9552318baa88b51149488965b0e9c20d31ccc125..faed74e799fd6f6b225e17d7ce1ce1efee235156 100644 (file)
@@ -1,5 +1,6 @@
 /* BFD backend for hp-ux 9000/300
-   Copyright (C) 1990, 1991, 1994, 1995 Free Software Foundation, Inc.
+   Copyright 1990, 1991, 1993, 1994, 1995, 1997, 2000, 2001
+   Free Software Foundation, Inc.
    Written by Glenn Engel.
 
 This file is part of BFD, the Binary File Descriptor library.
@@ -19,12 +20,10 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 /*
-
     hpux native  ------------> |               |
                                | hp300hpux bfd | ----------> hpux w/gnu ext
     hpux w/gnu extension ----> |               |
 
-
     Support for the 9000/[34]00 has several limitations.
       1. Shared libraries are not supported.
       2. The output format from this bfd is not usable by native tools.
@@ -191,6 +190,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "aoutx.h"
 
+static const bfd_target * MY (callback) PARAMS ((bfd *));
+static boolean            MY (write_object_contents) PARAMS ((bfd *));
+static void               convert_sym_type PARAMS ((struct external_nlist *, aout_symbol_type *, bfd *));
+
+boolean                   MY (slurp_symbol_table) PARAMS ((bfd *));
+void                      MY (swap_std_reloc_in) PARAMS ((bfd *, struct hp300hpux_reloc *, arelent *, asymbol **, bfd_size_type));
+boolean                   MY (slurp_reloc_table) PARAMS ((bfd *, sec_ptr, asymbol **));
+long                      MY (get_symtab) PARAMS ((bfd *, asymbol **));
+long                      MY (get_symtab_upper_bound) PARAMS ((bfd *));
+long                      MY (canonicalize_reloc) PARAMS ((bfd *, sec_ptr, arelent **, asymbol **));
+
 /* Since the hpux symbol table has nlist elements interspersed with
    strings and we need to insert som strings for secondary symbols, we
    give ourselves a little extra padding up front to account for
@@ -238,7 +248,6 @@ MY (callback) (abfd)
   bfd_default_set_arch_mach (abfd, DEFAULT_ARCH, 0);
 #endif
 
-
   if (obj_aout_subformat (abfd) == gnu_encap_format)
     {
       /* The file offsets of the relocation info */
@@ -270,11 +279,8 @@ MY (write_object_contents) (abfd)
   file_ptr text_end;
 
   memset (&exec_bytes, 0, sizeof (exec_bytes));
-#if CHOOSE_RELOC_SIZE
-  CHOOSE_RELOC_SIZE (abfd);
-#else
+
   obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
-#endif
 
   if (adata (abfd).magic == undecided_magic)
     NAME (aout,adjust_sizes_and_vmas) (abfd, &text_size, &text_end);
@@ -336,9 +342,9 @@ MY (write_object_contents) (abfd)
 
 static void
 convert_sym_type (sym_pointer, cache_ptr, abfd)
-     struct external_nlist *sym_pointer;
+     struct external_nlist *sym_pointer ATTRIBUTE_UNUSED;
      aout_symbol_type *cache_ptr;
-     bfd *abfd;
+     bfd *abfd ATTRIBUTE_UNUSED;
 {
   int name_type;
   int new_type;
@@ -422,7 +428,6 @@ convert_sym_type (sym_pointer, cache_ptr, abfd)
 
 }
 
-
 /*
 DESCRIPTION
         Swaps the information in an executable header taken from a raw
@@ -488,7 +493,6 @@ NAME (aout,swap_exec_header_in) (abfd, raw_bytes, execp)
   while (0);
 }
 
-
 /* The hp symbol table is a bit different than other a.out targets.  Instead
    of having an array of nlist items and an array of strings, hp's format
    has them mixed together in one structure.  In addition, the strings are
@@ -541,7 +545,6 @@ MY (slurp_symbol_table) (abfd)
       return false;
     }
 
-
   sym_end = (struct external_nlist *) (((char *) syms) + symbol_bytes);
 
   /* first, march thru the table and figure out how many symbols there are */
@@ -618,15 +621,13 @@ MY (slurp_symbol_table) (abfd)
   return true;
 }
 
-
-
 void
 MY (swap_std_reloc_in) (abfd, bytes, cache_ptr, symbols, symcount)
      bfd *abfd;
      struct hp300hpux_reloc *bytes;
      arelent *cache_ptr;
      asymbol **symbols;
-     bfd_size_type symcount;
+     bfd_size_type symcount ATTRIBUTE_UNUSED;
 {
   int r_index;
   int r_extern = 0;
@@ -742,7 +743,6 @@ doit:
 
   count = reloc_size / each_size;
 
-
   reloc_cache = (arelent *) bfd_zalloc (abfd, (size_t) (count * sizeof
                                                        (arelent)));
   if (!reloc_cache && count != 0)
@@ -772,14 +772,12 @@ doit:
                              bfd_get_symcount (abfd));
     }
 
-
   bfd_release (abfd, relocs);
   asect->relocation = reloc_cache;
   asect->reloc_count = count;
   return true;
 }
 
-
 /************************************************************************/
 /* The following functions are identical to functions in aoutx.h except */
 /* they refer to MY(func) rather than NAME(aout,func) and they also     */
@@ -825,9 +823,6 @@ MY (get_symtab_upper_bound) (abfd)
   return (bfd_get_symcount (abfd) + 1) * (sizeof (aout_symbol_type *));
 }
 
-
-
-
 long
 MY (canonicalize_reloc) (abfd, section, relptr, symbols)
      bfd *abfd;
@@ -866,5 +861,4 @@ MY (canonicalize_reloc) (abfd, section, relptr, symbols)
   return section->reloc_count;
 }
 
-
 #include "aout-target.h"
This page took 0.024891 seconds and 4 git commands to generate.