OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-6.8/] [bfd/] [coffswap.h] - Diff between revs 157 and 225

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 157 Rev 225
Line 1... Line 1...
/* Generic COFF swapping routines, for BFD.
/* Generic COFF swapping routines, for BFD.
   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000,
   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000,
   2001, 2002, 2005, 2007
   2001, 2002, 2004, 2005, 2007
   Free Software Foundation, Inc.
   Free Software Foundation, Inc.
   Written by Cygnus Support.
   Written by Cygnus Support.
 
 
   This file is part of BFD, the Binary File Descriptor library.
   This file is part of BFD, the Binary File Descriptor library.
 
 
Line 380... Line 380...
 
 
static void
static void
coff_swap_aux_in (bfd *abfd,
coff_swap_aux_in (bfd *abfd,
                  void * ext1,
                  void * ext1,
                  int type,
                  int type,
                  int class,
                  int in_class,
                  int indx,
                  int indx,
                  int numaux,
                  int numaux,
                  void * in1)
                  void * in1)
{
{
  AUXENT *ext = (AUXENT *) ext1;
  AUXENT *ext = (AUXENT *) ext1;
  union internal_auxent *in = (union internal_auxent *) in1;
  union internal_auxent *in = (union internal_auxent *) in1;
 
 
#ifdef COFF_ADJUST_AUX_IN_PRE
#ifdef COFF_ADJUST_AUX_IN_PRE
  COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, class, indx, numaux, in1);
  COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1);
#endif
#endif
 
 
  switch (class)
  switch (in_class)
    {
    {
    case C_FILE:
    case C_FILE:
      if (ext->x_file.x_fname[0] == 0)
      if (ext->x_file.x_fname[0] == 0)
        {
        {
          in->x_file.x_n.x_zeroes = 0;
          in->x_file.x_n.x_zeroes = 0;
Line 444... Line 444...
  in->x_sym.x_tagndx.l = H_GET_32 (abfd, ext->x_sym.x_tagndx);
  in->x_sym.x_tagndx.l = H_GET_32 (abfd, ext->x_sym.x_tagndx);
#ifndef NO_TVNDX
#ifndef NO_TVNDX
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
  in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
#endif
#endif
 
 
  if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class))
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
 
      || ISTAG (in_class))
    {
    {
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
      in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
      in->x_sym.x_fcnary.x_fcn.x_endndx.l = GET_FCN_ENDNDX (abfd, ext);
      in->x_sym.x_fcnary.x_fcn.x_endndx.l = GET_FCN_ENDNDX (abfd, ext);
    }
    }
  else
  else
Line 475... Line 476...
    }
    }
 
 
 end: ;
 end: ;
 
 
#ifdef COFF_ADJUST_AUX_IN_POST
#ifdef COFF_ADJUST_AUX_IN_POST
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, class, indx, numaux, in1);
  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
#endif
#endif
}
}
 
 
static unsigned int
static unsigned int
coff_swap_aux_out (bfd * abfd,
coff_swap_aux_out (bfd * abfd,
                   void * inp,
                   void * inp,
                   int type,
                   int type,
                   int class,
                   int in_class,
                   int indx ATTRIBUTE_UNUSED,
                   int indx ATTRIBUTE_UNUSED,
                   int numaux ATTRIBUTE_UNUSED,
                   int numaux ATTRIBUTE_UNUSED,
                   void * extp)
                   void * extp)
{
{
  union internal_auxent * in = (union internal_auxent *) inp;
  union internal_auxent * in = (union internal_auxent *) inp;
  AUXENT *ext = (AUXENT *) extp;
  AUXENT *ext = (AUXENT *) extp;
 
 
#ifdef COFF_ADJUST_AUX_OUT_PRE
#ifdef COFF_ADJUST_AUX_OUT_PRE
  COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, class, indx, numaux, extp);
  COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, in_class, indx, numaux, extp);
#endif
#endif
 
 
  memset (ext, 0, AUXESZ);
  memset (ext, 0, AUXESZ);
 
 
  switch (class)
  switch (in_class)
    {
    {
    case C_FILE:
    case C_FILE:
      if (in->x_file.x_fname[0] == 0)
      if (in->x_file.x_fname[0] == 0)
        {
        {
          H_PUT_32 (abfd, 0, ext->x_file.x_n.x_zeroes);
          H_PUT_32 (abfd, 0, ext->x_file.x_n.x_zeroes);
Line 535... Line 536...
  H_PUT_32 (abfd, in->x_sym.x_tagndx.l, ext->x_sym.x_tagndx);
  H_PUT_32 (abfd, in->x_sym.x_tagndx.l, ext->x_sym.x_tagndx);
#ifndef NO_TVNDX
#ifndef NO_TVNDX
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
  H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
#endif
#endif
 
 
  if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class))
  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
 
      || ISTAG (in_class))
    {
    {
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
      PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.l, ext);
      PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.l, ext);
    }
    }
  else
  else
Line 565... Line 567...
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
      PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
    }
    }
 
 
 end:
 end:
#ifdef COFF_ADJUST_AUX_OUT_POST
#ifdef COFF_ADJUST_AUX_OUT_POST
  COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, class, indx, numaux, extp);
  COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, in_class, indx, numaux, extp);
#endif
#endif
  return AUXESZ;
  return AUXESZ;
}
}
 
 
#endif /* NO_COFF_SYMBOLS */
#endif /* NO_COFF_SYMBOLS */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.