Back to index

cell-binutils  2.17cvs20070401
Defines | Functions | Variables
sparclynx.c File Reference
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
#include "aout/sun4.h"
#include "libaout.h"
#include "aout/aout64.h"
#include "aout/stab_gnu.h"
#include "aout/ar.h"

Go to the source code of this file.

Defines

#define MY(OP)   CONCAT2 (sparclynx_aout_,OP)
#define TARGETNAME   "a.out-sparc-lynx"
#define MACHTYPE_OK(mtype)

Functions

void NAME (lynx, set_arch_mach)
static void choose_reloc_size (bfd *abfd)
static bfd_boolean NAME (aout, sparclynx_write_object_contents)
static bfd_boolean
sparclynx_set_sizes 
PARAMS ((bfd *))
static bfd_boolean sparclynx_set_sizes (bfd *abfd)
char * lynx_core_file_failing_command ()
int lynx_core_file_failing_signal ()
bfd_boolean lynx_core_file_matches_executable_p ()
const bfd_targetlynx_core_file_p ()

Variables

static struct aout_backend_data

Define Documentation

#define MACHTYPE_OK (   mtype)
Value:
((mtype) == M_UNKNOWN \
                         || (mtype) == M_68010 \
                         || (mtype) == M_68020 \
                         || (mtype) == M_SPARC)
#define MY (   OP)    CONCAT2 (sparclynx_aout_,OP)

Definition at line 24 of file sparclynx.c.

#define TARGETNAME   "a.out-sparc-lynx"

Definition at line 25 of file sparclynx.c.


Function Documentation

static void choose_reloc_size ( bfd abfd) [static]

Definition at line 131 of file sparclynx.c.

{
  switch (bfd_get_arch (abfd))
    {
    case bfd_arch_sparc:
      obj_reloc_entry_size (abfd) = RELOC_EXT_SIZE;
      break;
    default:
      obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
      break;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void NAME ( lynx  ,
set_arch_mach   
)

Definition at line 38 of file sparclynx.c.

{
  /* Determine the architecture and machine type of the object file.  */
  enum bfd_architecture arch;
  unsigned long machine;

  switch (machtype)
    {
    case M_UNKNOWN:
      /* Some Sun3s make magic numbers without cpu types in them, so
        we'll default to the 68000.  */
      arch = bfd_arch_m68k;
      machine = bfd_mach_m68000;
      break;

    case M_68010:
    case M_HP200:
      arch = bfd_arch_m68k;
      machine = bfd_mach_m68010;
      break;

    case M_68020:
    case M_HP300:
      arch = bfd_arch_m68k;
      machine = bfd_mach_m68020;
      break;

    case M_SPARC:
      arch = bfd_arch_sparc;
      machine = 0;
      break;

    case M_386:
    case M_386_DYNIX:
      arch = bfd_arch_i386;
      machine = 0;
      break;

    case M_HPUX:
      arch = bfd_arch_m68k;
      machine = 0;
      break;

    default:
      arch = bfd_arch_obscure;
      machine = 0;
      break;
    }
  bfd_set_arch_mach (abfd, arch, machine);
}
static bfd_boolean NAME ( aout  ,
sparclynx_write_object_contents   
) [static]

Definition at line 150 of file sparclynx.c.

{
  struct external_exec exec_bytes;
  struct internal_exec *execp = exec_hdr (abfd);

  /* Magic number, maestro, please!  */
  switch (bfd_get_arch (abfd))
    {
    case bfd_arch_m68k:
      switch (bfd_get_mach (abfd))
       {
       case bfd_mach_m68010:
         N_SET_MACHTYPE (*execp, M_68010);
         break;
       default:
       case bfd_mach_m68020:
         N_SET_MACHTYPE (*execp, M_68020);
         break;
       }
      break;
    case bfd_arch_sparc:
      N_SET_MACHTYPE (*execp, M_SPARC);
      break;
    case bfd_arch_i386:
      N_SET_MACHTYPE (*execp, M_386);
      break;
    default:
      N_SET_MACHTYPE (*execp, M_UNKNOWN);
    }

  choose_reloc_size (abfd);

  N_SET_FLAGS (*execp, aout_backend_info (abfd)->exec_hdr_flags);

  WRITE_HEADERS (abfd, execp);

  return TRUE;
}

Here is the call graph for this function:

static bfd_boolean sparclynx_set_sizes PARAMS ( (bfd *)  ) [static]
static bfd_boolean sparclynx_set_sizes ( bfd abfd) [static]

Definition at line 194 of file sparclynx.c.

{
  switch (bfd_get_arch (abfd))
    {
    default:
      return FALSE;
    case bfd_arch_sparc:
      adata (abfd).page_size = 0x2000;
      adata (abfd).segment_size = 0x2000;
      adata (abfd).exec_bytes_size = EXEC_BYTES_SIZE;
      return TRUE;
    case bfd_arch_m68k:
      adata (abfd).page_size = 0x2000;
      adata (abfd).segment_size = 0x20000;
      adata (abfd).exec_bytes_size = EXEC_BYTES_SIZE;
      return TRUE;
    }
}

Here is the call graph for this function:


Variable Documentation

Initial value:
  {
    0, 1, 0, 1, 0, sparclynx_set_sizes, 0,
    0,                      
    0,                      
    0,                      
    0,                      
    0,                      
    0                       
  }

Definition at line 214 of file sparclynx.c.