/* BFD back-end for Zilog Z800n COFF binaries.
- Copyright 1992, 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003
- Free Software Foundation, Inc.
+ Copyright 1992, 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003,
+ 2004 Free Software Foundation, Inc.
Contributed by Cygnus Support.
Written by Steve Chamberlain, <sac@cygnus.com>.
#include "coff/internal.h"
#include "libcoff.h"
-static void extra_case PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *, arelent *, bfd_byte *, unsigned int *, unsigned int *));
-static void reloc_processing PARAMS ((arelent *, struct internal_reloc *, asymbol **, bfd *, asection *));
-static void rtype2howto PARAMS ((arelent *, struct internal_reloc *));
-static int coff_z8k_select_reloc PARAMS ((reloc_howto_type *));
-
#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (1)
static reloc_howto_type r_imm32 =
/* Turn a howto into a reloc number */
static int
-coff_z8k_select_reloc (howto)
- reloc_howto_type *howto;
+coff_z8k_select_reloc (reloc_howto_type *howto)
{
return howto->type;
}
/* 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)
{
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);
}
static void
-extra_case (in_abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr)
- bfd * in_abfd;
- struct bfd_link_info * link_info;
- struct bfd_link_order * link_order;
- arelent * reloc;
- bfd_byte * data;
- unsigned int * src_ptr;
- unsigned int * dst_ptr;
+extra_case (bfd *in_abfd,
+ struct bfd_link_info *link_info,
+ struct bfd_link_order *link_order,
+ arelent *reloc,
+ bfd_byte *data,
+ unsigned int *src_ptr,
+ unsigned int *dst_ptr)
{
asection * input_section = link_order->u.indirect.section;
{
bfd_vma dst = bfd_coff_reloc16_get_value (reloc, link_info,
input_section);
- /* Adresses are 23 bit, and the layout of those in a 32-bit
+ /* Addresses are 23 bit, and the layout of those in a 32-bit
value is as follows:
1AAAAAAA xxxxxxxx AAAAAAAA AAAAAAAA
(A - address bits, x - ignore). */
if (gap > 128 || gap < -128)
{
if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ (link_info, NULL,
+ bfd_asymbol_name (*reloc->sym_ptr_ptr),
reloc->howto->name, reloc->addend, input_section->owner,
input_section, reloc->address)))
abort ();
if (gap > 0 || gap < -127)
{
if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ (link_info, NULL,
+ bfd_asymbol_name (*reloc->sym_ptr_ptr),
reloc->howto->name, reloc->addend, input_section->owner,
input_section, reloc->address)))
abort ();
if (gap > 4096 || gap < -4095)
{
if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ (link_info, NULL,
+ bfd_asymbol_name (*reloc->sym_ptr_ptr),
reloc->howto->name, reloc->addend, input_section->owner,
input_section, reloc->address)))
abort ();
if (gap > 32767 || gap < -32768)
{
if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ (link_info, NULL,
+ bfd_asymbol_name (*reloc->sym_ptr_ptr),
reloc->howto->name, reloc->addend, input_section->owner,
input_section, reloc->address)))
abort ();