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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-6.8/] [bfd/] [aix5ppc-core.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...
/* IBM RS/6000 "XCOFF" back-end for BFD.
/* IBM RS/6000 "XCOFF" back-end for BFD.
   Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007
   Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
   Free Software Foundation, Inc.
   Free Software Foundation, Inc.
   Written by Tom Rix
   Written by Tom Rix
   Contributed by Red Hat Inc.
   Contributed by Red Hat Inc.
 
 
   This file is part of BFD, the Binary File Descriptor library.
   This file is part of BFD, the Binary File Descriptor library.
Line 38... Line 38...
/* Need to define this macro so struct ld_info64 get included.  */
/* Need to define this macro so struct ld_info64 get included.  */
#define __LDINFO_PTRACE64__
#define __LDINFO_PTRACE64__
#include <sys/ldr.h>
#include <sys/ldr.h>
#include <core.h>
#include <core.h>
 
 
 
/* The default architecture and machine for matching core files.  */
 
#define DEFAULT_ARCHITECTURE    bfd_arch_powerpc
 
#define DEFAULT_MACHINE         bfd_mach_ppc_620
 
 
#define core_hdr(abfd)          ((struct core_dumpxx *) abfd->tdata.any)
#define core_hdr(abfd)          ((struct core_dumpxx *) abfd->tdata.any)
 
 
#define CHECK_FILE_OFFSET(s, v) \
#define CHECK_FILE_OFFSET(s, v) \
  ((bfd_signed_vma)(v) < 0 || (bfd_signed_vma)(v) > (bfd_signed_vma)(s).st_size)
  ((bfd_signed_vma)(v) < 0 || (bfd_signed_vma)(v) > (bfd_signed_vma)(s).st_size)
 
 
const bfd_target *
const bfd_target *
xcoff64_core_p (bfd *abfd)
xcoff64_core_p (bfd *abfd)
{
{
 
  enum bfd_architecture arch;
 
  unsigned long mach;
  struct core_dumpxx core, *new_core_hdr;
  struct core_dumpxx core, *new_core_hdr;
  struct stat statbuf;
  struct stat statbuf;
  asection *sec;
  asection *sec;
  struct __ld_info64 ldinfo;
  struct __ld_info64 ldinfo;
  bfd_vma ld_offset;
  bfd_vma ld_offset;
Line 216... Line 222...
          sec->vma = vminfo.vminfo_addr;
          sec->vma = vminfo.vminfo_addr;
          sec->filepos = vminfo.vminfo_offset;
          sec->filepos = vminfo.vminfo_offset;
        }
        }
    }
    }
 
 
 
  /* Set the architecture and machine.  */
 
  arch = DEFAULT_ARCHITECTURE;
 
  mach = DEFAULT_MACHINE;
 
  bfd_default_set_arch_mach (abfd, arch, mach);
 
 
  return_value = (bfd_target *) abfd->xvec;     /* This is garbage for now.  */
  return_value = (bfd_target *) abfd->xvec;     /* This is garbage for now.  */
 
 
 xcoff64_core_p_error:
 xcoff64_core_p_error:
  if (bfd_get_error () != bfd_error_system_call)
  if (bfd_get_error () != bfd_error_system_call)
    bfd_set_error (bfd_error_wrong_format);
    bfd_set_error (bfd_error_wrong_format);

powered by: WebSVN 2.1.0

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