Stricter prototyping, to force type conversions between 64-bit target and
[deliverable/binutils-gdb.git] / bfd / ieee.c
index 7e0a98aa481f2bc338520ffb6ec84eee8e7cfc6e..301899618ebc363844b7f554884f9b63e0b57830 100644 (file)
@@ -32,7 +32,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 
 #include "obstack.h"
-#define obstack_chunk_alloc bfd_xmalloc
+#define obstack_chunk_alloc bfd_xmalloc_by_size_t
 #define obstack_chunk_free free
 
 /* Functions for writing to ieee files in the strange way that the
@@ -847,8 +847,8 @@ DEFUN(ieee_slurp_sections,(abfd),
 {
   ieee_data_type *ieee = IEEE_DATA(abfd);
   file_ptr offset = ieee->w.r.section_part;
-
   asection *section = (asection *)NULL;
+  char *name;
 
   if (offset != 0) {
     bfd_byte section_type[3];
@@ -1004,7 +1004,7 @@ DEFUN(ieee_archive_p,(abfd),
   boolean loop;
 
   unsigned int i;
-uint8e_type buffer[512];
+  unsigned char buffer[512];
   struct obstack ob;
   file_ptr buffer_offset = 0;
   ieee_ar_data_type *save = abfd->tdata.ieee_ar_data;
@@ -1122,8 +1122,9 @@ DEFUN(ieee_object_p,(abfd),
   char *processor;
   unsigned int part;
   ieee_data_type *ieee;
-  uint8e_type buffer[300];
+  unsigned char buffer[300];
   ieee_data_type *save = IEEE_DATA(abfd);
+
   abfd->tdata.ieee_data = 0;
   ieee_mkobject(abfd);
   
@@ -1198,7 +1199,7 @@ DEFUN(ieee_object_p,(abfd),
    quickly. We can work out how big the file is from the trailer
    record */
 
-  IEEE_DATA(abfd)->h.first_byte = (uint8e_type *) bfd_alloc(ieee->h.abfd, ieee->w.r.me_record
+  IEEE_DATA(abfd)->h.first_byte = (unsigned char *) bfd_alloc(ieee->h.abfd, ieee->w.r.me_record
                                            + 50);
   bfd_seek(abfd, (file_ptr) 0, SEEK_SET);
   bfd_read((PTR)(IEEE_DATA(abfd)->h.first_byte), 1,   ieee->w.r.me_record+50,  abfd);
@@ -1211,6 +1212,18 @@ abfd->tdata.ieee_data = save;
   return (bfd_target *)NULL;
 }
 
+void 
+DEFUN(ieee_get_symbol_info,(ignore_abfd, symbol, ret),
+      bfd *ignore_abfd AND
+      asymbol *symbol AND
+      symbol_info *ret)
+{
+  bfd_symbol_info (symbol, ret);
+  if (symbol->name[0] == ' ')
+    ret->name = "* empty table entry ";
+  if (!symbol->section)
+    ret->type = (symbol->flags & BSF_LOCAL) ? 'a' : 'A';
+}
 
 void 
 DEFUN(ieee_print_symbol,(ignore_abfd, afile,  symbol, how),
@@ -1232,7 +1245,6 @@ DEFUN(ieee_print_symbol,(ignore_abfd, afile,  symbol, how),
 #endif
     BFD_FAIL();
     break;
-  case bfd_print_symbol_nm:
   case bfd_print_symbol_all:
       {
        CONST char *section_name = symbol->section == (asection *)NULL ?
@@ -1261,7 +1273,7 @@ static void
 DEFUN(do_one,(ieee, current_map, location_ptr,s),
       ieee_data_type *ieee AND
       ieee_per_section_type *current_map AND
-      uint8e_type *location_ptr AND
+      unsigned char *location_ptr AND
       asection *s)
 {
   switch (this_byte(&(ieee->h)))  
@@ -1522,7 +1534,7 @@ DEFUN(ieee_slurp_section_data,(abfd),
                 */
 
              unsigned int iterations ;
-             uint8e_type *start ;
+             unsigned char *start ;
              next_byte(&(ieee->h));
              iterations = must_parse_int(&(ieee->h));
              start =  ieee->h.input_p;
@@ -1780,7 +1792,7 @@ DEFUN(do_with_relocs,(abfd, s),
 
        if ((PTR)stream == (PTR)NULL) {
          /* Outputting a section without data, fill it up */
-         stream = (uint8e_type *)(bfd_alloc(abfd, s->_raw_size));
+         stream = (unsigned char *)(bfd_alloc(abfd, s->_raw_size));
          memset((PTR)stream, 0, s->_raw_size);
        }
        while (current_byte_index < s->_raw_size) {
@@ -2989,8 +3001,12 @@ bfd_target ieee_vec =
   ' ',                         /* ar_pad_char */
   16,                          /* ar_max_namelen */
     1,                         /* minimum alignment */
-_do_getb64, _do_putb64, _do_getb32, _do_putb32, _do_getb16, _do_putb16, /* data */
-_do_getb64, _do_putb64,  _do_getb32, _do_putb32, _do_getb16, _do_putb16, /* hdrs */
+_do_getb64, _do_getb_signed_64, _do_putb64,
+    _do_getb32, _do_getb_signed_32, _do_putb32,
+    _do_getb16, _do_getb_signed_16, _do_putb16, /* data */
+_do_getb64, _do_getb_signed_64, _do_putb64,
+    _do_getb32, _do_getb_signed_32, _do_putb32,
+    _do_getb16, _do_getb_signed_16, _do_putb16, /* hdrs */
 
   { _bfd_dummy_target,
      ieee_object_p,            /* bfd_check_format */
This page took 0.025738 seconds and 4 git commands to generate.