OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-6.8/] [bfd/] [pdp11.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 PDP-11 a.out binaries.
/* BFD back-end for PDP-11 a.out binaries.
   Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007
   Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
   Free Software Foundation, Inc.
   Free Software Foundation, Inc.
 
 
   This file is part of BFD, the Binary File Descriptor library.
   This file is part of BFD, the Binary File Descriptor library.
 
 
   This program is free software; you can redistribute it and/or modify
   This program is free software; you can redistribute it and/or modify
Line 63... Line 63...
 
 
/* There is no flags field.  */
/* There is no flags field.  */
#define N_FLAGS(exec)           0
#define N_FLAGS(exec)           0
 
 
#define N_SET_FLAGS(exec, flags) do { } while (0)
#define N_SET_FLAGS(exec, flags) do { } while (0)
#define N_BADMAG(x) (((x).a_info != OMAGIC)   \
#define N_BADMAG(x) (N_MAGIC(x) != OMAGIC       \
                  && ((x).a_info != NMAGIC)   \
                     && N_MAGIC(x) != NMAGIC    \
                  && ((x).a_info != A_MAGIC3) \
                     && N_MAGIC(x) != ZMAGIC)
                  && ((x).a_info != A_MAGIC4) \
 
                  && ((x).a_info != A_MAGIC5) \
 
                  && ((x).a_info != A_MAGIC6))
 
 
 
#include "sysdep.h"
#include "sysdep.h"
#include "bfd.h"
#include "bfd.h"
 
 
#define external_exec pdp11_external_exec
#define external_exec pdp11_external_exec
Line 505... Line 502...
  if (N_MAGIC (*execp) == ZMAGIC)
  if (N_MAGIC (*execp) == ZMAGIC)
    {
    {
      abfd->flags |= D_PAGED | WP_TEXT;
      abfd->flags |= D_PAGED | WP_TEXT;
      adata (abfd).magic = z_magic;
      adata (abfd).magic = z_magic;
    }
    }
  else if (N_MAGIC (*execp) == QMAGIC)
 
    {
 
      abfd->flags |= D_PAGED | WP_TEXT;
 
      adata (abfd).magic = z_magic;
 
      adata (abfd).subformat = q_magic_format;
 
    }
 
  else if (N_MAGIC (*execp) == NMAGIC)
  else if (N_MAGIC (*execp) == NMAGIC)
    {
    {
      abfd->flags |= WP_TEXT;
      abfd->flags |= WP_TEXT;
      adata (abfd).magic = n_magic;
      adata (abfd).magic = n_magic;
    }
    }
  else if (N_MAGIC (*execp) == OMAGIC
  else if (N_MAGIC (*execp) == OMAGIC)
           || N_MAGIC (*execp) == BMAGIC)
 
    adata (abfd).magic = o_magic;
    adata (abfd).magic = o_magic;
  else
  else
    {
    {
      /* Should have been checked with N_BADMAG before this routine
      /* Should have been checked with N_BADMAG before this routine
         was called.  */
         was called.  */
Line 956... Line 946...
 
 
  /* Fix up exec header while we're at it.  */
  /* Fix up exec header while we're at it.  */
  execp->a_text = obj_textsec(abfd)->size;
  execp->a_text = obj_textsec(abfd)->size;
  if (ztih && (!abdp || (abdp && !abdp->exec_header_not_counted)))
  if (ztih && (!abdp || (abdp && !abdp->exec_header_not_counted)))
    execp->a_text += adata(abfd).exec_bytes_size;
    execp->a_text += adata(abfd).exec_bytes_size;
  if (obj_aout_subformat (abfd) == q_magic_format)
 
    N_SET_MAGIC (*execp, QMAGIC);
 
  else
 
    N_SET_MAGIC (*execp, ZMAGIC);
    N_SET_MAGIC (*execp, ZMAGIC);
 
 
  /* Spec says data section should be rounded up to page boundary.  */
  /* Spec says data section should be rounded up to page boundary.  */
  obj_datasec(abfd)->size
  obj_datasec(abfd)->size
    = align_power (obj_datasec(abfd)->size,
    = align_power (obj_datasec(abfd)->size,
Line 1444... Line 1431...
 
 
asymbol *
asymbol *
NAME (aout, make_empty_symbol) (bfd *abfd)
NAME (aout, make_empty_symbol) (bfd *abfd)
{
{
  bfd_size_type amt = sizeof (aout_symbol_type);
  bfd_size_type amt = sizeof (aout_symbol_type);
  aout_symbol_type *new = bfd_zalloc (abfd, amt);
  aout_symbol_type *new_symbol_type = bfd_zalloc (abfd, amt);
 
 
  if (!new)
  if (!new_symbol_type)
    return NULL;
    return NULL;
  new->symbol.the_bfd = abfd;
  new_symbol_type->symbol.the_bfd = abfd;
 
 
  return &new->symbol;
  return &new_symbol_type->symbol;
}
}
 
 
/* Translate a set of internal symbols into external symbols.  */
/* Translate a set of internal symbols into external symbols.  */
 
 
bfd_boolean
bfd_boolean

powered by: WebSVN 2.1.0

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