Add MIPS r3 and r5 support.
[deliverable/binutils-gdb.git] / bfd / tekhex.c
index 49bac82ab3f760d567b4d1a82f47ee342438fbc4..7fcab936da26b22600800441355ae6399bce9b8b 100644 (file)
@@ -1,6 +1,5 @@
 /* BFD backend for Extended Tektronix Hex Format  objects.
-   Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002,
-   2003, 2004, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1992-2014 Free Software Foundation, Inc.
    Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -297,7 +296,7 @@ getsym (char *dstp, char **srcp, unsigned int *lenp)
   char *src = *srcp;
   unsigned int i;
   unsigned int len;
-  
+
   if (!ISHEX (*src))
     return FALSE;
 
@@ -324,7 +323,8 @@ find_chunk (bfd *abfd, bfd_vma vma)
   if (!d)
     {
       /* No chunk for this address, so make one up.  */
-      d = bfd_zalloc (abfd, (bfd_size_type) sizeof (struct data_struct));
+      d = (struct data_struct *)
+          bfd_zalloc (abfd, (bfd_size_type) sizeof (struct data_struct));
 
       if (!d)
        return NULL;
@@ -383,7 +383,7 @@ first_phase (bfd *abfd, int type, char *src)
       section = bfd_get_section_by_name (abfd, sym);
       if (section == NULL)
        {
-         char *n = bfd_alloc (abfd, (bfd_size_type) len + 1);
+         char *n = (char *) bfd_alloc (abfd, (bfd_size_type) len + 1);
 
          if (!n)
            return FALSE;
@@ -460,22 +460,22 @@ static bfd_boolean
 pass_over (bfd *abfd, bfd_boolean (*func) (bfd *, int, char *))
 {
   unsigned int chars_on_line;
-  bfd_boolean eof = FALSE;
+  bfd_boolean is_eof = FALSE;
 
   /* To the front of the file.  */
   if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
     return FALSE;
-  while (! eof)
+  while (! is_eof)
     {
       char src[MAXCHUNK];
       char type;
 
       /* Find first '%'.  */
-      eof = (bfd_boolean) (bfd_bread (src, (bfd_size_type) 1, abfd) != 1);
-      while (*src != '%' && !eof)
-       eof = (bfd_boolean) (bfd_bread (src, (bfd_size_type) 1, abfd) != 1);
+      is_eof = (bfd_boolean) (bfd_bread (src, (bfd_size_type) 1, abfd) != 1);
+      while (*src != '%' && !is_eof)
+       is_eof = (bfd_boolean) (bfd_bread (src, (bfd_size_type) 1, abfd) != 1);
 
-      if (eof)
+      if (is_eof)
        break;
 
       /* Fetch the type and the length and the checksum.  */
@@ -534,7 +534,7 @@ tekhex_mkobject (bfd *abfd)
 {
   tdata_type *tdata;
 
-  tdata = bfd_alloc (abfd, (bfd_size_type) sizeof (tdata_type));
+  tdata = (tdata_type *) bfd_alloc (abfd, (bfd_size_type) sizeof (tdata_type));
   if (!tdata)
     return FALSE;
   abfd->tdata.tekhex_data = tdata;
@@ -942,6 +942,7 @@ tekhex_print_symbol (bfd *abfd,
 #define tekhex_bfd_get_relocated_section_contents   bfd_generic_get_relocated_section_contents
 #define tekhex_bfd_relax_section                    bfd_generic_relax_section
 #define tekhex_bfd_gc_sections                      bfd_generic_gc_sections
+#define tekhex_bfd_lookup_section_flags                    bfd_generic_lookup_section_flags
 #define tekhex_bfd_merge_sections                   bfd_generic_merge_sections
 #define tekhex_bfd_is_group_section                 bfd_generic_is_group_section
 #define tekhex_bfd_discard_group                    bfd_generic_discard_group
@@ -951,6 +952,8 @@ tekhex_print_symbol (bfd *abfd,
 #define tekhex_bfd_link_hash_table_free             _bfd_generic_link_hash_table_free
 #define tekhex_bfd_link_add_symbols                 _bfd_generic_link_add_symbols
 #define tekhex_bfd_link_just_syms                   _bfd_generic_link_just_syms
+#define tekhex_bfd_copy_link_hash_symbol_type \
+  _bfd_generic_copy_link_hash_symbol_type
 #define tekhex_bfd_final_link                       _bfd_generic_final_link
 #define tekhex_bfd_link_split_section               _bfd_generic_link_split_section
 #define tekhex_get_section_contents_in_window       _bfd_generic_get_section_contents_in_window
@@ -969,6 +972,7 @@ const bfd_target tekhex_vec =
   0,                           /* Leading underscore.  */
   ' ',                         /* AR_pad_char.  */
   16,                          /* AR_max_namelen.  */
+  0,                           /* match priority.  */
   bfd_getb64, bfd_getb_signed_64, bfd_putb64,
   bfd_getb32, bfd_getb_signed_32, bfd_putb32,
   bfd_getb16, bfd_getb_signed_16, bfd_putb16,  /* Data.  */
This page took 0.048254 seconds and 4 git commands to generate.