summaryrefslogtreecommitdiff
path: root/bfd/coff-or32.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2012-07-13 14:22:38 +0000
committerNick Clifton <nickc@redhat.com>2012-07-13 14:22:38 +0000
commita30d1ca8a850c69dd8550c3205d4f32b18daffe5 (patch)
treed7fa389dd6a6997e99c888341918575f1aa13c9d /bfd/coff-or32.c
parent92c85feb2c1117dc98e978ec4c80c1d8b4d1d3b2 (diff)
downloadgdb-a30d1ca8a850c69dd8550c3205d4f32b18daffe5.tar.gz
* aix386-core.c: Remove use of PTR and PARAMS macros.
* archive.c: Likewise. * cache.c: Likewise. * cisco-core.c: Likewise. * coff-alpha.c: Likewise. * coff-apollo.c: Likewise. * coff-aux.c: Likewise. * coff-h8300.c: Likewise. * coff-h8500.c: Likewise. * coff-i386.c: Likewise. * coff-i960.c: Likewise. * coff-ia64.c: Likewise. * coff-m68k.c: Likewise. * coff-m88k.c: Likewise. * coff-mcore.c: Likewise. * coff-mips.c: Likewise. * coff-or32.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-sh.c: Likewise. * coff-sparc.c: Likewise. * coff-stgo32.c: Likewise. * coff-tic30.c: Likewise. * coff-tic4x.c: Likewise. * coff-tic54x.c: Likewise. * coff-tic80.c: Likewise. * coff-w65.c: Likewise. * cofflink.c: Likewise. * cpu-arc.c: Likewise. * cpu-cris.c: Likewise. * cpu-h8500.c: Likewise. * cpu-i960.c: Likewise. * cpu-msp430.c: Likewise. * cpu-ns32k.c: Likewise. * cpu-powerpc.c: Likewise. * cpu-rs6000.c: Likewise. * cpu-tic4x.c: Likewise. * cpu-w65.c: Likewise. * ecoff.c: Likewise. * ecofflink.c: Likewise. * elf-m10200.c: Likewise. * elf32-bfin.c: Likewise. * elf32-cris.c: Likewise. * elf32-crx.c: Likewise. * elf32-fr30.c: Likewise. * elf32-frv.c: Likewise. * elf32-h8300.c: Likewise. * elf32-i960.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m68hc11.c: Likewise. * elf32-m68hc12.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68k.c: Likewise. * elf32-mcore.c: Likewise. * elf32-rl78.c: Likewise. * elf32-rx.c: Likewise. * elf32-s390.c: Likewise. * elf32-vax.c: Likewise. * elf64-alpha.c: Likewise. * elf64-mmix.c: Likewise. * elf64-s390.c: Likewise. * elf64-sparc.c: Likewise. * elfnn-ia64.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * hash.c: Likewise. * hp300hpux.c: Likewise. * hppabsd-core.c: Likewise. * hpux-core.c: Likewise. * i386dynix.c: Likewise. * i386linux.c: Likewise. * i386lynx.c: Likewise. * i386mach3.c: Likewise. * i386msdos.c: Likewise. * i386os9k.c: Likewise. * irix-core.c: Likewise. * lynx-core.c: Likewise. * m68klinux.c: Likewise. * mach-o.h: Likewise. * mipsbsd.c: Likewise. * netbsd-core.c: Likewise. * nlm32-i386.c: Likewise. * osf-core.c: Likewise. * pc532-mach.c: Likewise. * pef.c: Likewise. * ppcboot.c: Likewise. * ptrace-core.c: Likewise. * reloc16.c: Likewise. * sco5-core.c: Likewise. * som.h: Likewise. * sparclinux.c: Likewise. * sparclynx.c: Likewise. * ticoff.h: Likewise. * trad-core.c: Likewise. * vms-lib.c: Likewise. * xsym.h: Likewise.
Diffstat (limited to 'bfd/coff-or32.c')
-rw-r--r--bfd/coff-or32.c75
1 files changed, 29 insertions, 46 deletions
diff --git a/bfd/coff-or32.c b/bfd/coff-or32.c
index a9683df717b..18835e1373a 100644
--- a/bfd/coff-or32.c
+++ b/bfd/coff-or32.c
@@ -1,5 +1,5 @@
/* BFD back-end for OpenRISC 1000 COFF binaries.
- Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2011
+ Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2011, 2012
Free Software Foundation, Inc.
Contributed by Ivan Guzvinec <ivang@opencores.org>
@@ -29,18 +29,8 @@
#include "coff/internal.h"
#include "libcoff.h"
-static long get_symbol_value
- PARAMS ((asymbol *));
static bfd_reloc_status_type or32_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static bfd_boolean coff_or32_relocate_section
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
- struct internal_reloc *, struct internal_syment *, asection **));
-static bfd_boolean coff_or32_adjust_symndx
- PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
- struct internal_reloc *, bfd_boolean *));
-static void reloc_processing
- PARAMS ((arelent *, struct internal_reloc *, asymbol **, bfd *, asection *));
+ (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2)
@@ -61,8 +51,7 @@ static void reloc_processing
/* Provided the symbol, returns the value reffed. */
static long
-get_symbol_value (symbol)
- asymbol *symbol;
+get_symbol_value (asymbol *symbol)
{
long relocation = 0;
@@ -79,15 +68,13 @@ get_symbol_value (symbol)
/* This function is in charge of performing all the or32 relocations. */
static bfd_reloc_status_type
-or32_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd,
- error_message)
- bfd *abfd;
- arelent *reloc_entry;
- asymbol *symbol_in;
- PTR data;
- asection *input_section;
- bfd *output_bfd;
- char **error_message;
+or32_reloc (bfd *abfd,
+ arelent *reloc_entry,
+ asymbol *symbol_in,
+ void * data,
+ asection *input_section,
+ bfd *output_bfd,
+ char **error_message)
{
/* The consth relocation comes in two parts, we have to remember
the state between calls, in these variables. */
@@ -289,12 +276,11 @@ static reloc_howto_type howto_table[] =
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)
{
static bfd_vma ihihalf_vaddr = (bfd_vma) -1;
@@ -333,16 +319,14 @@ reloc_processing (relent,reloc, symbols, abfd, section)
/* The reloc processing routine for the optimized COFF linker. */
static bfd_boolean
-coff_or32_relocate_section (output_bfd, info, input_bfd, input_section,
- contents, relocs, syms, sections)
- bfd *output_bfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *info;
- bfd *input_bfd;
- asection *input_section;
- bfd_byte *contents;
- struct internal_reloc *relocs;
- struct internal_syment *syms;
- asection **sections;
+coff_or32_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info,
+ bfd *input_bfd,
+ asection *input_section,
+ bfd_byte *contents,
+ struct internal_reloc *relocs,
+ struct internal_syment *syms,
+ asection **sections)
{
struct internal_reloc *rel;
struct internal_reloc *relend;
@@ -554,13 +538,12 @@ coff_or32_relocate_section (output_bfd, info, input_bfd, input_section,
is actually an addend, not a symbol index at all. */
static bfd_boolean
-coff_or32_adjust_symndx (obfd, info, ibfd, sec, irel, adjustedp)
- bfd *obfd ATTRIBUTE_UNUSED;
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
- bfd *ibfd ATTRIBUTE_UNUSED;
- asection *sec ATTRIBUTE_UNUSED;
- struct internal_reloc *irel;
- bfd_boolean *adjustedp;
+coff_or32_adjust_symndx (bfd *obfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ bfd *ibfd ATTRIBUTE_UNUSED,
+ asection *sec ATTRIBUTE_UNUSED,
+ struct internal_reloc *irel,
+ bfd_boolean *adjustedp)
{
if (irel->r_type == R_IHCONST)
*adjustedp = TRUE;