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, 2009, 2010
|
Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011
|
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 2890... |
Line 2890... |
|
|
return (struct bfd_hash_entry *) ret;
|
return (struct bfd_hash_entry *) ret;
|
}
|
}
|
|
|
static bfd_boolean
|
static bfd_boolean
|
aout_link_write_other_symbol (struct aout_link_hash_entry *h, void * data)
|
aout_link_write_other_symbol (struct bfd_hash_entry *bh, void *data)
|
{
|
{
|
|
struct aout_link_hash_entry *h = (struct aout_link_hash_entry *) bh;
|
struct aout_final_link_info *finfo = (struct aout_final_link_info *) data;
|
struct aout_final_link_info *finfo = (struct aout_final_link_info *) data;
|
bfd *output_bfd;
|
bfd *output_bfd;
|
int type;
|
int type;
|
bfd_vma val;
|
bfd_vma val;
|
struct external_nlist outsym;
|
struct external_nlist outsym;
|
Line 3054... |
Line 3055... |
can't. Note that we lose the other and desc information
|
can't. Note that we lose the other and desc information
|
here. I don't think that will ever matter for a global
|
here. I don't think that will ever matter for a global
|
symbol. */
|
symbol. */
|
h->indx = -2;
|
h->indx = -2;
|
h->written = FALSE;
|
h->written = FALSE;
|
if (! aout_link_write_other_symbol (h, (void *) finfo))
|
if (!aout_link_write_other_symbol (&h->root.root, finfo))
|
return FALSE;
|
return FALSE;
|
r_index = h->indx;
|
r_index = h->indx;
|
}
|
}
|
else
|
else
|
{
|
{
|
Line 3333... |
Line 3334... |
global symbol. */
|
global symbol. */
|
if (h->indx < 0)
|
if (h->indx < 0)
|
{
|
{
|
h->indx = -2;
|
h->indx = -2;
|
h->written = FALSE;
|
h->written = FALSE;
|
if (! aout_link_write_other_symbol (h,
|
if (!aout_link_write_other_symbol (&h->root.root,
|
(void *) finfo))
|
finfo))
|
return FALSE;
|
return FALSE;
|
}
|
}
|
r_index = h->indx;
|
r_index = h->indx;
|
}
|
}
|
else
|
else
|
Line 3797... |
Line 3798... |
struct aout_link_hash_entry *h;
|
struct aout_link_hash_entry *h;
|
|
|
h = aout_link_hash_lookup (aout_hash_table (info), "__DYNAMIC",
|
h = aout_link_hash_lookup (aout_hash_table (info), "__DYNAMIC",
|
FALSE, FALSE, FALSE);
|
FALSE, FALSE, FALSE);
|
if (h != NULL)
|
if (h != NULL)
|
aout_link_write_other_symbol (h, &aout_info);
|
aout_link_write_other_symbol (&h->root.root, &aout_info);
|
}
|
}
|
|
|
/* The most time efficient way to do the link would be to read all
|
/* The most time efficient way to do the link would be to read all
|
the input object files into memory and then sort out the
|
the input object files into memory and then sort out the
|
information into the output file. Unfortunately, that will
|
information into the output file. Unfortunately, that will
|
Line 3869... |
Line 3870... |
}
|
}
|
}
|
}
|
}
|
}
|
|
|
/* Write out any symbols that we have not already written out. */
|
/* Write out any symbols that we have not already written out. */
|
aout_link_hash_traverse (aout_hash_table (info),
|
bfd_hash_traverse (&info->hash->table,
|
aout_link_write_other_symbol,
|
aout_link_write_other_symbol,
|
(void *) &aout_info);
|
&aout_info);
|
|
|
/* Now handle any relocs we were asked to create by the linker.
|
/* Now handle any relocs we were asked to create by the linker.
|
These did not come from any input file. We must do these after
|
These did not come from any input file. We must do these after
|
we have written out all the symbols, so that we know the symbol
|
we have written out all the symbols, so that we know the symbol
|
indices to use. */
|
indices to use. */
|
Line 4509... |
Line 4510... |
HAS_SYMS | HAS_LOCALS | WP_TEXT),
|
HAS_SYMS | HAS_LOCALS | WP_TEXT),
|
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_CODE | SEC_DATA),
|
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_CODE | SEC_DATA),
|
MY_symbol_leading_char,
|
MY_symbol_leading_char,
|
AR_PAD_CHAR, /* AR_pad_char. */
|
AR_PAD_CHAR, /* AR_pad_char. */
|
15, /* AR_max_namelen. */
|
15, /* AR_max_namelen. */
|
|
0, /* match priority. */
|
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
|
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
|
bfd_getp32, bfd_getp_signed_32, bfd_putp32,
|
bfd_getp32, bfd_getp_signed_32, bfd_putp32,
|
bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* Data. */
|
bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* Data. */
|
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
|
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
|
bfd_getp32, bfd_getp_signed_32, bfd_putp32,
|
bfd_getp32, bfd_getp_signed_32, bfd_putp32,
|