Back to index

cell-binutils  2.17cvs20070401
Defines | Functions | Variables
coff-apollo.c File Reference
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
#include "coff/apollo.h"
#include "coff/internal.h"
#include "libcoff.h"
#include "coffcode.h"

Go to the source code of this file.

Defines

#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER   (3)
#define BADMAG(x)   M68KBADMAG(x)
#define APOLLO_M68   1 /* Customize coffcode.h */
#define RTYPE2HOWTO(internal, relocentry)   apollo_rtype2howto (internal, (relocentry)->r_type)
#define SELECT_RELOC(external, internal)   external.r_type = apollo_howto2rtype (internal);
#define TARGET_SYM   apollocoff_vec
#define TARGET_NAME   "apollo-m68k"

Functions

void apollo_rtype2howto PARAMS ((arelent *, int))
int apollo_howto2rtype PARAMS ((reloc_howto_type *))
void apollo_rtype2howto (arelent *internal, int relocentry)
int apollo_howto2rtype (reloc_howto_type *internal)

Variables

reloc_howto_type apollocoff_howto_table []

Define Documentation

#define APOLLO_M68   1 /* Customize coffcode.h */

Definition at line 50 of file coff-apollo.c.

#define BADMAG (   x)    M68KBADMAG(x)

Definition at line 48 of file coff-apollo.c.

Definition at line 30 of file coff-apollo.c.

#define RTYPE2HOWTO (   internal,
  relocentry 
)    apollo_rtype2howto (internal, (relocentry)->r_type)

Definition at line 101 of file coff-apollo.c.

#define SELECT_RELOC (   external,
  internal 
)    external.r_type = apollo_howto2rtype (internal);

Definition at line 104 of file coff-apollo.c.

#define TARGET_NAME   "apollo-m68k"

Definition at line 114 of file coff-apollo.c.

#define TARGET_SYM   apollocoff_vec

Definition at line 110 of file coff-apollo.c.


Function Documentation

int apollo_howto2rtype ( reloc_howto_type *  internal)

Definition at line 76 of file coff-apollo.c.

{
  if (internal->pc_relative)
    {
      switch (internal->bitsize)
       {
       case 32: return R_PCRLONG;
       case 16: return R_PCRWORD;
       case 8: return R_PCRBYTE;
       }
    }
  else
    {
      switch (internal->bitsize)
       {
       case 32: return R_RELLONG;
       case 16: return R_RELWORD;
       case 8: return R_RELBYTE;
       }
    }
  return R_RELLONG;
}
void apollo_rtype2howto ( arelent internal,
int  relocentry 
)

Definition at line 59 of file coff-apollo.c.

{
  switch (relocentry)
    {
    case R_RELBYTE:  internal->howto = apollocoff_howto_table + 0; break;
    case R_RELWORD:  internal->howto = apollocoff_howto_table + 1; break;
    case R_RELLONG:  internal->howto = apollocoff_howto_table + 2; break;
    case R_PCRBYTE:  internal->howto = apollocoff_howto_table + 3; break;
    case R_PCRWORD:  internal->howto = apollocoff_howto_table + 4; break;
    case R_PCRLONG:  internal->howto = apollocoff_howto_table + 5; break;
    case R_RELLONG_NEG:     internal->howto = apollocoff_howto_table + 6; break;
    }
}
int apollo_howto2rtype PARAMS ( (reloc_howto_type *)  )

Variable Documentation

reloc_howto_type apollocoff_howto_table[]
Initial value:
  {
    HOWTO (R_RELBYTE,              0,  0,        8,  FALSE, 0, complain_overflow_bitfield, 0, "8",       TRUE, 0x000000ff,0x000000ff, FALSE),
    HOWTO (R_RELWORD,              0,  1,        16, FALSE, 0, complain_overflow_bitfield, 0, "16",      TRUE, 0x0000ffff,0x0000ffff, FALSE),
    HOWTO (R_RELLONG,              0,  2,        32, FALSE, 0, complain_overflow_bitfield, 0, "32",      TRUE, 0xffffffff,0xffffffff, FALSE),
    HOWTO (R_PCRBYTE,              0,  0,        8,  TRUE,  0, complain_overflow_signed,   0, "DISP8",   TRUE, 0x000000ff,0x000000ff, FALSE),
    HOWTO (R_PCRWORD,              0,  1,        16, TRUE,  0, complain_overflow_signed,   0, "DISP16",  TRUE, 0x0000ffff,0x0000ffff, FALSE),
    HOWTO (R_PCRLONG,              0,  2,        32, TRUE,  0, complain_overflow_signed,   0, "DISP32",  TRUE, 0xffffffff,0xffffffff, FALSE),
    HOWTO (R_RELLONG_NEG,      0,  -2,    32, FALSE, 0, complain_overflow_bitfield, 0, "-32",     TRUE, 0xffffffff,0xffffffff, FALSE),
  }

Definition at line 35 of file coff-apollo.c.