* som.c (hppa_som_gen_reloc_type): Use correct enum type for
authorJeff Law <law@redhat.com>
Wed, 2 Mar 1994 19:59:03 +0000 (19:59 +0000)
committerJeff Law <law@redhat.com>
Wed, 2 Mar 1994 19:59:03 +0000 (19:59 +0000)
        field parameter.
        (bfd_som_set_section_attributes): Use unsigned int rather than
        unsigned char to avoid GNU-C extensions.
        (bfd_som_attach_aux_hdr): Return a boolean to indicate success
        or failure rather than aborting on failure.

        * som.h (bfd_som_set_section_attributes): Fix prototype to match
        som.c changes.
        (bfd_som_attach_aux_hdr): Add prototype.
        (hppa_som-gen_reloc_type): Likewise.

        * elf32-hppa.c: Add a couple casts to make HP compiler happy.
        (hppa_look_for_stubs_in_section): Do not return false on failure
        until rest of code is ready to handle it.  Abort for now.

bfd/ChangeLog
bfd/elf32-hppa.c
bfd/som.c
bfd/som.h

index 122c51ead2a07f717d56d686ab7f97af16485b6d..9b2d231d2791ffbb7e2e6ce888f846d572ed5662 100644 (file)
@@ -1,3 +1,23 @@
+Wed Mar  2 11:57:03 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
+
+       * Changes to make HP C compiler happy in both traditional
+       and ANSI mode.
+       * som.c (hppa_som_gen_reloc_type): Use correct enum type for
+       field parameter.
+       (bfd_som_set_section_attributes): Use unsigned int rather than
+       unsigned char to avoid GNU-C extensions.
+       (bfd_som_attach_aux_hdr): Return a boolean to indicate success
+       or failure rather than aborting on failure.
+
+       * som.h (bfd_som_set_section_attributes): Fix prototype to match
+       som.c changes.
+       (bfd_som_attach_aux_hdr): Add prototype.
+       (hppa_som-gen_reloc_type): Likewise.
+
+       * elf32-hppa.c: Add a couple casts to make HP compiler happy.
+       (hppa_look_for_stubs_in_section): Do not return false on failure
+       until rest of code is ready to handle it.  Abort for now.
+
 Tue Mar  1 18:33:59 1994  Jim Kingdon  (kingdon@deneb.cygnus.com)
 
        * bfd-in2.h: Rebuilt.
index 0c953ed0dec1c245bae62f8692963a9fb7f8d953..151a44b13496930a24e7bb8780ebddf04c7cc927 100644 (file)
@@ -2191,7 +2191,8 @@ hppa_elf_build_linker_stub (abfd, output_bfd, link_info, reloc_entry,
         old symbol (a function symbol) to the stub (the stub will call
         the original function).  */
       stub_sym = stub_entry->sym;
-      reloc_entry->sym_ptr_ptr = bfd_zalloc (abfd, sizeof (asymbol **));
+      reloc_entry->sym_ptr_ptr = (asymbol **) bfd_zalloc (abfd,
+                                                         sizeof (asymbol **));
       if (reloc_entry->sym_ptr_ptr == NULL)
        {
          bfd_set_error (bfd_error_no_memory);
@@ -2229,7 +2230,8 @@ hppa_elf_build_linker_stub (abfd, output_bfd, link_info, reloc_entry,
 
       /* Redirect the original relocation from the old symbol (a function)
         to the stub (the stub calls the function).  */
-      reloc_entry->sym_ptr_ptr = bfd_zalloc (abfd, sizeof (asymbol **));
+      reloc_entry->sym_ptr_ptr = (asymbol **) bfd_zalloc (abfd,
+                                                         sizeof (asymbol **));
       if (reloc_entry->sym_ptr_ptr == NULL)
        {
          bfd_set_error (bfd_error_no_memory);
@@ -2724,7 +2726,7 @@ hppa_look_for_stubs_in_section (stub_bfd, abfd, output_bfd, asec,
          if (!abfd->outsymbols)
            {
              bfd_set_error (bfd_error_no_memory);
-             return false;
+             abort ();
            }
          abfd->symcount = bfd_canonicalize_symtab (abfd, abfd->outsymbols);
        }
index df78f00c1c850b1866247903e331b9ce3723197b..765d39f4b54ed6ba9871ff83bfdb8861cb201340 100644 (file)
--- a/bfd/som.c
+++ b/bfd/som.c
@@ -1369,7 +1369,7 @@ hppa_som_gen_reloc_type (abfd, base_type, format, field)
      bfd *abfd;
      int base_type;
      int format;
-     enum hppa_reloc_field_selector_type field;
+     enum hppa_reloc_field_selector_type_alt field;
 {
   int *final_type, **final_types;
 
@@ -3990,7 +3990,7 @@ bfd_som_set_section_attributes (section, defined, private, sort_key, spnum)
      asection *section;
      int defined;
      int private;
-     unsigned char sort_key;
+     unsigned int sort_key;
      int spnum;
 {
   struct space_dictionary_record *space_dict;
@@ -4052,7 +4052,7 @@ bfd_som_attach_unwind_info (symbol, unwind_desc)
 
 /* Attach an auxiliary header to the BFD backend so that it may be
    written into the object file.  */
-void
+boolean
 bfd_som_attach_aux_hdr (abfd, type, string)
      bfd *abfd;
      int type;
@@ -4071,7 +4071,7 @@ bfd_som_attach_aux_hdr (abfd, type, string)
       if (!obj_som_version_hdr (abfd))
        {
          bfd_set_error (bfd_error_no_memory);
-         abort();              /* FIXME */
+         return false;
        }
       obj_som_version_hdr (abfd)->header_id.type = VERSION_AUX_ID;
       obj_som_version_hdr (abfd)->header_id.length = len + pad;
@@ -4092,7 +4092,7 @@ bfd_som_attach_aux_hdr (abfd, type, string)
       if (!obj_som_copyright_hdr (abfd))
        {
          bfd_set_error (bfd_error_no_error);
-         abort();              /* FIXME */
+         return false;
        }
       obj_som_copyright_hdr (abfd)->header_id.type = COPYRIGHT_AUX_ID;
       obj_som_copyright_hdr (abfd)->header_id.length = len + pad;
@@ -4100,8 +4100,7 @@ bfd_som_attach_aux_hdr (abfd, type, string)
       obj_som_copyright_hdr (abfd)->string_length = len;
       strcpy (obj_som_copyright_hdr (abfd)->copyright, string);
     }
-  else
-    abort ();
+  return true;
 }
 
 static boolean
index 5a7c92de3c88cb515116f64f425393642043e8bc..00554802cc14567a294d385aa4aa82f3ef5bcd95 100644 (file)
--- a/bfd/som.h
+++ b/bfd/som.h
@@ -135,7 +135,7 @@ struct som_section_data_struct
 #define som_section_data(sec) \
   ((struct som_section_data_struct *)sec->used_by_bfd)
 #define som_symbol_data(symbol) \
-  (((som_symbol_type **) symbol->udata))
+  ((som_symbol_type *) symbol)
 
 
 /* Defines groups of basic relocations.  FIXME:  These should
@@ -160,10 +160,12 @@ struct som_section_data_struct
 
 /* Exported functions, mostly for use by GAS.  */
 void bfd_som_set_section_attributes PARAMS ((asection *, int, int,
-                                            unsigned char, int));
+                                            unsigned int, int));
 void bfd_som_set_subsection_attributes PARAMS ((asection *, asection *,
                                                int, unsigned int, int));
 void bfd_som_set_symbol_type PARAMS ((asymbol *, unsigned int));
 void bfd_som_attach_unwind_info PARAMS ((asymbol *, char *));
-
+boolean bfd_som_attach_aux_hdr PARAMS ((bfd *, int, char *));
+int ** hppa_som_gen_reloc_type
+  PARAMS ((bfd *, int, int, enum hppa_reloc_field_selector_type_alt));
 #endif /* _SOM_H */
This page took 0.034392 seconds and 4 git commands to generate.