Change read_alphacoff_dynamic_symtab to use gdb::byte_vector
[deliverable/binutils-gdb.git] / bfd / coff-i960.c
index b2c1512c272964064cc2912b9449313a6fa2b579..4e68d44d18c2833a761dfcec894acd72202358b3 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back-end for Intel 960 COFF files.
 /* BFD back-end for Intel 960 COFF files.
-   Copyright (C) 1990-2016 Free Software Foundation, Inc.
+   Copyright (C) 1990-2018 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -128,7 +128,7 @@ optcall_callback (bfd *abfd,
       {
       case C_LEAFSTAT:
       case C_LEAFEXT:
       {
       case C_LEAFSTAT:
       case C_LEAFEXT:
-       /* This is a call to a leaf procedure, replace instruction with a bal
+       /* This is a call to a leaf procedure, replace instruction with a bal
           to the correct location.  */
        {
          union internal_auxent *aux = &((cs->native+2)->u.auxent);
           to the correct location.  */
        {
          union internal_auxent *aux = &((cs->native+2)->u.auxent);
@@ -142,9 +142,9 @@ optcall_callback (bfd *abfd,
             sym and auxents untouched, so the delta between the two
             is the offset of the bal entry point.  */
          word = ((word +  olf)  & BAL_MASK) | BAL;
             sym and auxents untouched, so the delta between the two
             is the offset of the bal entry point.  */
          word = ((word +  olf)  & BAL_MASK) | BAL;
-         bfd_put_32 (abfd, (bfd_vma) word,
+         bfd_put_32 (abfd, (bfd_vma) word,
                      (bfd_byte *) data + reloc_entry->address);
                      (bfd_byte *) data + reloc_entry->address);
-       }
+       }
        result = bfd_reloc_ok;
        break;
       case C_SCALL:
        result = bfd_reloc_ok;
        break;
       case C_SCALL:
@@ -201,7 +201,7 @@ coff_i960_relocate (bfd *abfd,
   if (bfd_is_com_section (bfd_get_section (symbol)))
     {
       /* I don't really know what the right action is for a common
   if (bfd_is_com_section (bfd_get_section (symbol)))
     {
       /* I don't really know what the right action is for a common
-         symbol.  */
+        symbol.  */
       return bfd_reloc_continue;
     }
 
       return bfd_reloc_continue;
     }
 
@@ -429,7 +429,7 @@ coff_i960_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
          else
            {
              sec = sections[symndx];
          else
            {
              sec = sections[symndx];
-              val = (sec->output_section->vma
+             val = (sec->output_section->vma
                     + sec->output_offset
                     + sym->n_value
                     - sec->vma);
                     + sec->output_offset
                     + sym->n_value
                     - sec->vma);
@@ -468,8 +468,8 @@ coff_i960_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
            {
            case C_NULL:
              /* This symbol is apparently not from a COFF input file.
            {
            case C_NULL:
              /* This symbol is apparently not from a COFF input file.
-                 We warn, and then assume that it is not a leaf
-                 function.  */
+                We warn, and then assume that it is not a leaf
+                function.  */
              (*info->callbacks->reloc_dangerous)
                (info,
                 _("uncertain calling convention for non-COFF symbol"),
              (*info->callbacks->reloc_dangerous)
                (info,
                 _("uncertain calling convention for non-COFF symbol"),
@@ -479,7 +479,7 @@ coff_i960_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
            case C_LEAFSTAT:
            case C_LEAFEXT:
              /* This is a call to a leaf procedure; use the bal
            case C_LEAFSTAT:
            case C_LEAFEXT:
              /* This is a call to a leaf procedure; use the bal
-                 instruction.  */
+                instruction.  */
              {
                long olf;
                unsigned long word;
              {
                long olf;
                unsigned long word;
@@ -614,9 +614,9 @@ const bfd_target icoff_be_vec =
   BFD_ENDIAN_LITTLE,           /* data byte order is little */
   BFD_ENDIAN_BIG,              /* header byte order is big */
 
   BFD_ENDIAN_LITTLE,           /* data byte order is little */
   BFD_ENDIAN_BIG,              /* header byte order is big */
 
-  (HAS_RELOC | EXEC_P |                /* object flags */
-   HAS_LINENO | HAS_DEBUG |
-   HAS_SYMS | HAS_LOCALS | WP_TEXT),
+  (HAS_RELOC | EXEC_P          /* object flags */
+   | HAS_LINENO | HAS_DEBUG
+   HAS_SYMS | HAS_LOCALS | WP_TEXT),
 
   (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
   '_',                         /* leading underscore */
 
   (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
   '_',                         /* leading underscore */
@@ -624,31 +624,43 @@ const bfd_target icoff_be_vec =
   15,                          /* ar_max_namelen */
   0,                           /* match priority.  */
 
   15,                          /* ar_max_namelen */
   0,                           /* match priority.  */
 
-bfd_getl64, bfd_getl_signed_64, bfd_putl64,
+  bfd_getl64, bfd_getl_signed_64, bfd_putl64,
      bfd_getl32, bfd_getl_signed_32, bfd_putl32,
      bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
      bfd_getl32, bfd_getl_signed_32, bfd_putl32,
      bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
-bfd_getb64, bfd_getb_signed_64, bfd_putb64,
+  bfd_getb64, bfd_getb_signed_64, bfd_putb64,
      bfd_getb32, bfd_getb_signed_32, bfd_putb32,
      bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
 
      bfd_getb32, bfd_getb_signed_32, bfd_putb32,
      bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
 
-  {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
-     bfd_generic_archive_p, _bfd_dummy_target},
-  {bfd_false, coff_mkobject,   /* bfd_set_format */
-     _bfd_generic_mkarchive, bfd_false},
-  {bfd_false, coff_write_object_contents,      /* bfd_write_contents */
-     _bfd_write_archive_contents, bfd_false},
-
-     BFD_JUMP_TABLE_GENERIC (coff),
-     BFD_JUMP_TABLE_COPY (coff),
-     BFD_JUMP_TABLE_CORE (_bfd_nocore),
-     BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
-     BFD_JUMP_TABLE_SYMBOLS (coff),
-     BFD_JUMP_TABLE_RELOCS (coff),
-     BFD_JUMP_TABLE_WRITE (coff),
-     BFD_JUMP_TABLE_LINK (coff),
-     BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
-
-  & icoff_le_vec,
+  {                            /* bfd_check_format */
+    _bfd_dummy_target,
+    coff_object_p,
+    bfd_generic_archive_p,
+    _bfd_dummy_target
+  },
+  {                            /* bfd_set_format */
+    _bfd_bool_bfd_false_error,
+    coff_mkobject,
+    _bfd_generic_mkarchive,
+    _bfd_bool_bfd_false_error
+  },
+  {                            /* bfd_write_contents */
+    _bfd_bool_bfd_false_error,
+    coff_write_object_contents,
+    _bfd_write_archive_contents,
+    _bfd_bool_bfd_false_error
+  },
+
+  BFD_JUMP_TABLE_GENERIC (coff),
+  BFD_JUMP_TABLE_COPY (coff),
+  BFD_JUMP_TABLE_CORE (_bfd_nocore),
+  BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
+  BFD_JUMP_TABLE_SYMBOLS (coff),
+  BFD_JUMP_TABLE_RELOCS (coff),
+  BFD_JUMP_TABLE_WRITE (coff),
+  BFD_JUMP_TABLE_LINK (coff),
+  BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+
+  &icoff_le_vec,
 
   COFF_SWAP_TABLE
 };
 
   COFF_SWAP_TABLE
 };
This page took 0.027475 seconds and 4 git commands to generate.