2005-07-24 Paolo Bonzini <bonzini@gnu.org>
[deliverable/binutils-gdb.git] / bfd / som.c
index 6ec9befce8584ad19e732e4eccb512df39d5e9de..c1195c9a10ad9e53c7372405ae650e096b562710 100644 (file)
--- a/bfd/som.c
+++ b/bfd/som.c
@@ -20,8 +20,8 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-   02111-1307, USA.  */
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+   02110-1301, USA.  */
 
 #include "alloca-conf.h"
 #include "bfd.h"
@@ -1054,7 +1054,7 @@ som_reloc_queue_find (unsigned char *p,
 
 static unsigned char *
 try_prev_fixup (bfd *abfd ATTRIBUTE_UNUSED,
-               int *subspace_reloc_sizep,
+               unsigned int *subspace_reloc_sizep,
                unsigned char *p,
                unsigned int size,
                struct reloc_queue *queue)
@@ -2958,8 +2958,8 @@ som_write_space_strings (bfd *abfd,
   /* Chunk of memory that we can use as buffer space, then throw
      away.  */
   size_t tmp_space_size = SOM_TMP_BUFSIZE;
-  unsigned char *tmp_space = alloca (tmp_space_size);
-  unsigned char *p = tmp_space;
+  char *tmp_space = alloca (tmp_space_size);
+  char *p = tmp_space;
   unsigned int strings_size = 0;
   asection *section;
   bfd_size_type amt;
@@ -3063,11 +3063,11 @@ som_write_symbol_strings (bfd *abfd,
   /* Chunk of memory that we can use as buffer space, then throw
      away.  */
   size_t tmp_space_size = SOM_TMP_BUFSIZE;
-  unsigned char *tmp_space = alloca (tmp_space_size);
-  unsigned char *p = tmp_space;
+  char *tmp_space = alloca (tmp_space_size);
+  char *p = tmp_space;
 
   unsigned int strings_size = 0;
-  unsigned char *comp[4];
+  char *comp[4];
   bfd_size_type amt;
 
   /* This gets a bit gruesome because of the compilation unit.  The
@@ -3227,7 +3227,7 @@ static bfd_boolean
 som_begin_writing (bfd *abfd)
 {
   unsigned long current_offset = 0;
-  int strings_size = 0;
+  unsigned int strings_size = 0;
   unsigned long num_spaces, num_subspaces, i;
   asection *section;
   unsigned int total_subspaces = 0;
@@ -3576,12 +3576,12 @@ som_finish_writing (bfd *abfd)
 {
   int num_spaces = som_count_spaces (abfd);
   asymbol **syms = bfd_get_outsymbols (abfd);
-  int i, num_syms, strings_size;
+  int i, num_syms;
   int subspace_index = 0;
   file_ptr location;
   asection *section;
   unsigned long current_offset;
-  unsigned int total_reloc_size;
+  unsigned int strings_size, total_reloc_size;
   bfd_size_type amt;
 
   /* We must set up the version identifier here as objcopy/strip copy
@@ -4842,7 +4842,7 @@ som_slurp_reloc_table (bfd *abfd,
                       asymbol **symbols,
                       bfd_boolean just_count)
 {
-  char *external_relocs;
+  unsigned char *external_relocs;
   unsigned int fixup_stream_size;
   arelent *internal_relocs;
   unsigned int num_relocs;
@@ -5080,16 +5080,20 @@ som_bfd_print_private_bfd_data (bfd *abfd, void *farg)
       fprintf (f, "\n");
       fprintf (f, "  type               %#x\n", auxhdr->type);
       fprintf (f, "  length             %#x\n", auxhdr->length);
-      fprintf (f, "  text size          %#lx\n", exec_header->exec_tsize);
-      fprintf (f, "  text memory offset %#lx\n", exec_header->exec_tmem);
-      fprintf (f, "  text file offset   %#lx\n", exec_header->exec_tfile);
-      fprintf (f, "  data size          %#lx\n", exec_header->exec_dsize);
-      fprintf (f, "  data memory offset %#lx\n", exec_header->exec_dmem);
-      fprintf (f, "  data file offset   %#lx\n", exec_header->exec_dfile);
-      fprintf (f, "  bss size           %#lx\n", exec_header->exec_bsize);
-      fprintf (f, "  entry point        %#lx\n", exec_header->exec_entry);
-      fprintf (f, "  loader flags       %#lx\n", exec_header->exec_flags);
-      fprintf (f, "  bss initializer    %#lx\n", exec_header->exec_bfill);
+
+      /* Note that, depending on the HP-UX version, the following fields can be
+         either ints, or longs.  */
+
+      fprintf (f, "  text size          %#lx\n", (long) exec_header->exec_tsize);
+      fprintf (f, "  text memory offset %#lx\n", (long) exec_header->exec_tmem);
+      fprintf (f, "  text file offset   %#lx\n", (long) exec_header->exec_tfile);
+      fprintf (f, "  data size          %#lx\n", (long) exec_header->exec_dsize);
+      fprintf (f, "  data memory offset %#lx\n", (long) exec_header->exec_dmem);
+      fprintf (f, "  data file offset   %#lx\n", (long) exec_header->exec_dfile);
+      fprintf (f, "  bss size           %#lx\n", (long) exec_header->exec_bsize);
+      fprintf (f, "  entry point        %#lx\n", (long) exec_header->exec_entry);
+      fprintf (f, "  loader flags       %#lx\n", (long) exec_header->exec_flags);
+      fprintf (f, "  bss initializer    %#lx\n", (long) exec_header->exec_bfill);
     }
 
   return TRUE;
@@ -6242,6 +6246,7 @@ som_bfd_link_split_section (bfd *abfd ATTRIBUTE_UNUSED, asection *sec)
 #define som_bfd_merge_private_bfd_data         _bfd_generic_bfd_merge_private_bfd_data
 #define som_bfd_copy_private_header_data       _bfd_generic_bfd_copy_private_header_data
 #define som_bfd_set_private_flags              _bfd_generic_bfd_set_private_flags
+#define som_find_inliner_info                  _bfd_nosymbols_find_inliner_info
 
 const bfd_target som_vec =
 {
This page took 0.026421 seconds and 4 git commands to generate.