Delete relocations associatesd with deleted exidx entries.
[deliverable/binutils-gdb.git] / bfd / coff-tic30.c
index dd97b2f8abbbbc7f7f88f07759b1f44bbc05a573..391cc702b1de75e9ed9f54260365929e4cc1a348 100644 (file)
@@ -1,13 +1,12 @@
 /* BFD back-end for TMS320C30 coff binaries.
 /* BFD back-end for TMS320C30 coff binaries.
-   Copyright 1998, 1999, 2000, 2001, 2002, 2007
-   Free Software Foundation, Inc.
+   Copyright (C) 1998-2016 Free Software Foundation, Inc.
    Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au)
 
    This file is part of BFD, the Binary File Descriptor library.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au)
 
    This file is part of BFD, the Binary File Descriptor library.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
 #include "coff/internal.h"
 #include "libcoff.h"
 
 #include "coff/internal.h"
 #include "libcoff.h"
 
-static int  coff_tic30_select_reloc PARAMS ((reloc_howto_type *));
-static void rtype2howto PARAMS ((arelent *, struct internal_reloc *));
-static void reloc_processing PARAMS ((arelent *, struct internal_reloc *, asymbol **, bfd *, asection *));
-
-reloc_howto_type * tic30_coff_reloc_type_lookup PARAMS ((bfd *, bfd_reloc_code_real_type));
-
 #define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (1)
 
 reloc_howto_type tic30_coff_howto_table[] =
 #define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (1)
 
 reloc_howto_type tic30_coff_howto_table[] =
@@ -59,10 +52,9 @@ reloc_howto_type tic30_coff_howto_table[] =
    map to the howto table entries that match those in both the aout
    and coff implementations.  */
 
    map to the howto table entries that match those in both the aout
    and coff implementations.  */
 
-reloc_howto_type *
-tic30_coff_reloc_type_lookup (abfd, code)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     bfd_reloc_code_real_type code;
+static reloc_howto_type *
+tic30_coff_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+                             bfd_reloc_code_real_type code)
 {
   switch (code)
     {
 {
   switch (code)
     {
@@ -104,8 +96,7 @@ tic30_coff_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
 /* Turn a howto into a reloc number.  */
 
 static int
 /* Turn a howto into a reloc number.  */
 
 static int
-coff_tic30_select_reloc (howto)
-     reloc_howto_type *howto;
+coff_tic30_select_reloc (reloc_howto_type *howto)
 {
   return howto->type;
 }
 {
   return howto->type;
 }
@@ -125,9 +116,7 @@ dst->r_stuff[1] = 'C';
 /* Code to turn a r_type into a howto ptr, uses the above howto table.  */
 
 static void
 /* Code to turn a r_type into a howto ptr, uses the above howto table.  */
 
 static void
-rtype2howto (internal, dst)
-     arelent *internal;
-     struct internal_reloc *dst;
+rtype2howto (arelent *internal, struct internal_reloc *dst)
 {
   switch (dst->r_type)
     {
 {
   switch (dst->r_type)
     {
@@ -147,7 +136,7 @@ rtype2howto (internal, dst)
       internal->howto = &tic30_coff_howto_table[4];
       break;
     default:
       internal->howto = &tic30_coff_howto_table[4];
       break;
     default:
-      abort ();
+      internal->howto = NULL;
       break;
     }
 }
       break;
     }
 }
@@ -163,12 +152,11 @@ rtype2howto (internal, dst)
  reloc_processing(relent, reloc, symbols, abfd, section)
 
 static void
  reloc_processing(relent, reloc, symbols, abfd, section)
 
 static void
-reloc_processing (relent, reloc, symbols, abfd, section)
-     arelent *relent;
-     struct internal_reloc *reloc;
-     asymbol **symbols;
-     bfd *abfd;
-     asection *section;
+reloc_processing (arelent *relent,
+                 struct internal_reloc *reloc,
+                 asymbol **symbols,
+                 bfd *abfd,
+                 asection *section)
 {
   relent->address = reloc->r_vaddr;
   rtype2howto (relent, reloc);
 {
   relent->address = reloc->r_vaddr;
   rtype2howto (relent, reloc);
@@ -182,6 +170,10 @@ reloc_processing (relent, reloc, symbols, abfd, section)
   relent->address -= section->vma;
 }
 
   relent->address -= section->vma;
 }
 
+#ifndef bfd_pe_print_pdata
+#define bfd_pe_print_pdata     NULL
+#endif
+
 #include "coffcode.h"
 
 const bfd_target tic30_coff_vec =
 #include "coffcode.h"
 
 const bfd_target tic30_coff_vec =
@@ -199,6 +191,7 @@ const bfd_target tic30_coff_vec =
   '_',                         /* leading symbol underscore */
   '/',                         /* ar_pad_char */
   15,                          /* ar_max_namelen */
   '_',                         /* leading symbol underscore */
   '/',                         /* ar_pad_char */
   15,                          /* 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 */
   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.027696 seconds and 4 git commands to generate.