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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-6.8/] [bfd/] [coff-alpha.c] - 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...
/* BFD back-end for ALPHA Extended-Coff files.
/* BFD back-end for ALPHA Extended-Coff files.
   Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
   Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
   2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
   2003, 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
   Modified from coff-mips.c by Steve Chamberlain <sac@cygnus.com> and
   Modified from coff-mips.c by Steve Chamberlain <sac@cygnus.com> and
   Ian Lance Taylor <ian@cygnus.com>.
   Ian Lance Taylor <ian@cygnus.com>.
 
 
   This file is part of BFD, the Binary File Descriptor library.
   This file is part of BFD, the Binary File Descriptor library.
 
 
Line 2118... Line 2118...
  bfd_byte ab[8];
  bfd_byte ab[8];
  bfd_size_type size;
  bfd_size_type size;
  bfd_byte *buf, *p;
  bfd_byte *buf, *p;
  struct bfd_in_memory *bim;
  struct bfd_in_memory *bim;
 
 
 
  buf = NULL;
  nbfd = _bfd_get_elt_at_filepos (archive, filepos);
  nbfd = _bfd_get_elt_at_filepos (archive, filepos);
  if (nbfd == NULL)
  if (nbfd == NULL)
    goto error_return;
    goto error_return;
 
 
  if ((nbfd->flags & BFD_IN_MEMORY) != 0)
  if ((nbfd->flags & BFD_IN_MEMORY) != 0)
Line 2149... Line 2150...
  /* The next eight bytes are the real file size.  */
  /* The next eight bytes are the real file size.  */
  if (bfd_bread (ab, (bfd_size_type) 8, nbfd) != 8)
  if (bfd_bread (ab, (bfd_size_type) 8, nbfd) != 8)
    goto error_return;
    goto error_return;
  size = H_GET_64 (nbfd, ab);
  size = H_GET_64 (nbfd, ab);
 
 
  if (size == 0)
  if (size != 0)
    buf = NULL;
 
  else
 
    {
    {
      bfd_size_type left;
      bfd_size_type left;
      bfd_byte dict[4096];
      bfd_byte dict[4096];
      unsigned int h;
      unsigned int h;
      bfd_byte b;
      bfd_byte b;
 
 
      buf = (bfd_byte *) bfd_alloc (nbfd, size);
      buf = (bfd_byte *) bfd_malloc (size);
      if (buf == NULL)
      if (buf == NULL)
        goto error_return;
        goto error_return;
      p = buf;
      p = buf;
 
 
      left = size;
      left = size;
Line 2212... Line 2211...
        }
        }
    }
    }
 
 
  /* Now the uncompressed file contents are in buf.  */
  /* Now the uncompressed file contents are in buf.  */
  bim = ((struct bfd_in_memory *)
  bim = ((struct bfd_in_memory *)
         bfd_alloc (nbfd, (bfd_size_type) sizeof (struct bfd_in_memory)));
         bfd_malloc ((bfd_size_type) sizeof (struct bfd_in_memory)));
  if (bim == NULL)
  if (bim == NULL)
    goto error_return;
    goto error_return;
  bim->size = size;
  bim->size = size;
  bim->buffer = buf;
  bim->buffer = buf;
 
 
Line 2228... Line 2227...
  BFD_ASSERT (! nbfd->cacheable);
  BFD_ASSERT (! nbfd->cacheable);
 
 
  return nbfd;
  return nbfd;
 
 
 error_return:
 error_return:
 
  if (buf != NULL)
 
    free (buf);
  if (nbfd != NULL)
  if (nbfd != NULL)
    bfd_close (nbfd);
    bfd_close (nbfd);
  return NULL;
  return NULL;
}
}
 
 
Line 2295... Line 2296...
    (unsigned (*) PARAMS ((bfd *,PTR,PTR))) bfd_void, /* sym_out */
    (unsigned (*) PARAMS ((bfd *,PTR,PTR))) bfd_void, /* sym_out */
    (unsigned (*) PARAMS ((bfd *,PTR,PTR))) bfd_void, /* lineno_out */
    (unsigned (*) PARAMS ((bfd *,PTR,PTR))) bfd_void, /* lineno_out */
    (unsigned (*) PARAMS ((bfd *,PTR,PTR))) bfd_void, /* reloc_out */
    (unsigned (*) PARAMS ((bfd *,PTR,PTR))) bfd_void, /* reloc_out */
    alpha_ecoff_swap_filehdr_out, alpha_ecoff_swap_aouthdr_out,
    alpha_ecoff_swap_filehdr_out, alpha_ecoff_swap_aouthdr_out,
    alpha_ecoff_swap_scnhdr_out,
    alpha_ecoff_swap_scnhdr_out,
    FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, TRUE, FALSE, 4, FALSE, 2,
    FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, TRUE,
 
    ECOFF_NO_LONG_SECTION_NAMES, 4, FALSE, 2,
    alpha_ecoff_swap_filehdr_in, alpha_ecoff_swap_aouthdr_in,
    alpha_ecoff_swap_filehdr_in, alpha_ecoff_swap_aouthdr_in,
    alpha_ecoff_swap_scnhdr_in, NULL,
    alpha_ecoff_swap_scnhdr_in, NULL,
    alpha_ecoff_bad_format_hook, _bfd_ecoff_set_arch_mach_hook,
    alpha_ecoff_bad_format_hook, _bfd_ecoff_set_arch_mach_hook,
    alpha_ecoff_mkobject_hook, _bfd_ecoff_styp_to_sec_flags,
    alpha_ecoff_mkobject_hook, _bfd_ecoff_styp_to_sec_flags,
    _bfd_ecoff_set_alignment_hook, _bfd_ecoff_slurp_symbol_table,
    _bfd_ecoff_set_alignment_hook, _bfd_ecoff_slurp_symbol_table,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL
    NULL, NULL, NULL, NULL
  },
  },
  /* Supported architecture.  */
  /* Supported architecture.  */
  bfd_arch_alpha,
  bfd_arch_alpha,
  /* Initial portion of armap string.  */
  /* Initial portion of armap string.  */
  "________64",
  "________64",
Line 2395... Line 2397...
#define _bfd_ecoff_bfd_merge_sections bfd_generic_merge_sections
#define _bfd_ecoff_bfd_merge_sections bfd_generic_merge_sections
#define _bfd_ecoff_bfd_is_group_section bfd_generic_is_group_section
#define _bfd_ecoff_bfd_is_group_section bfd_generic_is_group_section
#define _bfd_ecoff_bfd_discard_group bfd_generic_discard_group
#define _bfd_ecoff_bfd_discard_group bfd_generic_discard_group
#define _bfd_ecoff_section_already_linked \
#define _bfd_ecoff_section_already_linked \
  _bfd_generic_section_already_linked
  _bfd_generic_section_already_linked
 
#define _bfd_ecoff_bfd_define_common_symbol bfd_generic_define_common_symbol
 
 
const bfd_target ecoffalpha_little_vec =
const bfd_target ecoffalpha_little_vec =
{
{
  "ecoff-littlealpha",          /* name */
  "ecoff-littlealpha",          /* name */
  bfd_target_ecoff_flavour,
  bfd_target_ecoff_flavour,

powered by: WebSVN 2.1.0

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