summaryrefslogtreecommitdiff
path: root/bfd/coff-tic30.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-08-23 17:05:52 +0000
committerNick Clifton <nickc@redhat.com>2001-08-23 17:05:52 +0000
commitd98d783fa43d768fd3266a063e7806c66b379ffb (patch)
treeb8d18377d6b07d940cb811d08ac60048ae2793f0 /bfd/coff-tic30.c
parent12b48bc0fdf9922782eeb047469128139b3b5a5f (diff)
downloadgdb-d98d783fa43d768fd3266a063e7806c66b379ffb.tar.gz
Add more missing prototypes
Diffstat (limited to 'bfd/coff-tic30.c')
-rw-r--r--bfd/coff-tic30.c48
1 files changed, 26 insertions, 22 deletions
diff --git a/bfd/coff-tic30.c b/bfd/coff-tic30.c
index 5b8ffd4625f..67b22755417 100644
--- a/bfd/coff-tic30.c
+++ b/bfd/coff-tic30.c
@@ -1,5 +1,5 @@
/* BFD back-end for TMS320C30 coff binaries.
- Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001 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.
@@ -27,22 +27,28 @@
#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[] =
-{
- HOWTO (R_TIC30_ABS16, 2, 1, 16, false, 0, 0, NULL,
- "16", false, 0x0000FFFF, 0x0000FFFF, false),
- HOWTO (R_TIC30_ABS24, 2, 2, 24, false, 8, complain_overflow_bitfield, NULL,
- "24", false, 0xFFFFFF00, 0xFFFFFF00, false),
- HOWTO (R_TIC30_LDP, 18, 0, 24, false, 0, complain_overflow_bitfield, NULL,
- "LDP", false, 0x00FF0000, 0x000000FF, false),
- HOWTO (R_TIC30_ABS32, 2, 2, 32, false, 0, complain_overflow_bitfield, NULL,
- "32", false, 0xFFFFFFFF, 0xFFFFFFFF, false),
- HOWTO (R_TIC30_PC16, 2, 1, 16, true, 0, complain_overflow_signed, NULL,
- "PCREL", false, 0x0000FFFF, 0x0000FFFF, false),
- EMPTY_HOWTO (-1)
-};
+ {
+ HOWTO (R_TIC30_ABS16, 2, 1, 16, false, 0, 0, NULL,
+ "16", false, 0x0000FFFF, 0x0000FFFF, false),
+ HOWTO (R_TIC30_ABS24, 2, 2, 24, false, 8, complain_overflow_bitfield, NULL,
+ "24", false, 0xFFFFFF00, 0xFFFFFF00, false),
+ HOWTO (R_TIC30_LDP, 18, 0, 24, false, 0, complain_overflow_bitfield, NULL,
+ "LDP", false, 0x00FF0000, 0x000000FF, false),
+ HOWTO (R_TIC30_ABS32, 2, 2, 32, false, 0, complain_overflow_bitfield, NULL,
+ "32", false, 0xFFFFFFFF, 0xFFFFFFFF, false),
+ HOWTO (R_TIC30_PC16, 2, 1, 16, true, 0, complain_overflow_signed, NULL,
+ "PCREL", false, 0x0000FFFF, 0x0000FFFF, false),
+ EMPTY_HOWTO (-1)
+ };
#ifndef coff_bfd_reloc_type_lookup
#define coff_bfd_reloc_type_lookup tic30_coff_reloc_type_lookup
@@ -50,6 +56,7 @@ reloc_howto_type tic30_coff_howto_table[] =
/* For the case statement use the code values used in tc_gen_reloc to
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;
@@ -75,7 +82,7 @@ tic30_coff_reloc_type_lookup (abfd, code)
#endif
-/* Turn a howto into a reloc number */
+/* Turn a howto into a reloc number. */
static int
coff_tic30_select_reloc (howto)
@@ -126,7 +133,7 @@ rtype2howto (internal, dst)
}
}
-#define RTYPE2HOWTO(internal, relocentry) rtype2howto(internal,relocentry)
+#define RTYPE2HOWTO(internal, relocentry) rtype2howto (internal, relocentry)
/* Perform any necessary magic to the addend in a reloc entry */
@@ -148,13 +155,10 @@ reloc_processing (relent, reloc, symbols, abfd, section)
rtype2howto (relent, reloc);
if (reloc->r_symndx > 0)
- {
- relent->sym_ptr_ptr = symbols + obj_convert (abfd)[reloc->r_symndx];
- }
+ relent->sym_ptr_ptr = symbols + obj_convert (abfd)[reloc->r_symndx];
else
- {
- relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
- }
+ relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
+
relent->addend = reloc->r_offset;
relent->address -= section->vma;
}