/* BFD semi-generic back-end for a.out binaries.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
Written by Cygnus Support.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02110-1301, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/*
SECTION
|| machine == bfd_mach_sparc
|| machine == bfd_mach_sparc_sparclite
|| machine == bfd_mach_sparc_sparclite_le
- || machine == bfd_mach_sparc_v9)
+ || machine == bfd_mach_sparc_v8plus
+ || machine == bfd_mach_sparc_v8plusa
+ || machine == bfd_mach_sparc_v8plusb
+ || machine == bfd_mach_sparc_v9
+ || machine == bfd_mach_sparc_v9a
+ || machine == bfd_mach_sparc_v9b)
arch_flags = M_SPARC;
else if (machine == bfd_mach_sparc_sparclet)
arch_flags = M_SPARCLET;
arch_flags = M_386;
break;
- case bfd_arch_a29k:
- if (machine == 0)
- arch_flags = M_29K;
- break;
-
case bfd_arch_arm:
if (machine == 0)
arch_flags = M_ARM;
switch (arch)
{
case bfd_arch_sparc:
- case bfd_arch_a29k:
case bfd_arch_mips:
obj_reloc_entry_size (abfd) = RELOC_EXT_SIZE;
break;
{
obj_textsec (abfd)= newsect;
newsect->target_index = N_TEXT;
- return TRUE;
}
-
- if (obj_datasec (abfd) == NULL && !strcmp (newsect->name, ".data"))
+ else if (obj_datasec (abfd) == NULL && !strcmp (newsect->name, ".data"))
{
obj_datasec (abfd) = newsect;
newsect->target_index = N_DATA;
- return TRUE;
}
-
- if (obj_bsssec (abfd) == NULL && !strcmp (newsect->name, ".bss"))
+ else if (obj_bsssec (abfd) == NULL && !strcmp (newsect->name, ".bss"))
{
obj_bsssec (abfd) = newsect;
newsect->target_index = N_BSS;
- return TRUE;
}
}
/* We allow more than three sections internally. */
- return TRUE;
+ return _bfd_generic_new_section_hook (abfd, newsect);
}
bfd_boolean
}
int
-NAME (aout, sizeof_headers) (bfd *abfd, bfd_boolean execable ATTRIBUTE_UNUSED)
+NAME (aout, sizeof_headers) (bfd *abfd,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
return adata (abfd).exec_bytes_size;
}
bfd *abfd,
struct bfd_hash_entry *(*newfunc)
(struct bfd_hash_entry *, struct bfd_hash_table *,
- const char *))
+ const char *),
+ unsigned int entsize)
{
- return _bfd_link_hash_table_init (&table->root, abfd, newfunc);
+ return _bfd_link_hash_table_init (&table->root, abfd, newfunc, entsize);
}
/* Create an a.out link hash table. */
if (ret == NULL)
return NULL;
- if (! NAME (aout, link_hash_table_init) (ret, abfd,
- NAME (aout, link_hash_newfunc)))
+ if (!NAME (aout, link_hash_table_init) (ret, abfd,
+ NAME (aout, link_hash_newfunc),
+ sizeof (struct aout_link_hash_entry)))
{
free (ret);
return NULL;
aout_info.symbol_map = NULL;
aout_info.output_syms = NULL;
- if (! bfd_hash_table_init_n (&aout_info.includes.root,
- aout_link_includes_newfunc,
- 251))
+ if (!bfd_hash_table_init_n (&aout_info.includes.root,
+ aout_link_includes_newfunc,
+ sizeof (struct aout_link_includes_entry),
+ 251))
goto error_return;
includes_hash_initialized = TRUE;
{
if (obj_textsec (abfd) != NULL)
trsize += (_bfd_count_link_order_relocs (obj_textsec (abfd)
- ->link_order_head)
+ ->map_head.link_order)
* obj_reloc_entry_size (abfd));
if (obj_datasec (abfd) != NULL)
drsize += (_bfd_count_link_order_relocs (obj_datasec (abfd)
- ->link_order_head)
+ ->map_head.link_order)
* obj_reloc_entry_size (abfd));
}
include. */
for (o = abfd->sections; o != NULL; o = o->next)
{
- for (p = o->link_order_head; p != NULL; p = p->next)
+ for (p = o->map_head.link_order; p != NULL; p = p->next)
if (p->type == bfd_indirect_link_order)
p->u.indirect.section->linker_mark = TRUE;
}
have_link_order_relocs = FALSE;
for (o = abfd->sections; o != NULL; o = o->next)
{
- for (p = o->link_order_head;
+ for (p = o->map_head.link_order;
p != NULL;
p = p->next)
{
{
for (o = abfd->sections; o != NULL; o = o->next)
{
- for (p = o->link_order_head;
+ for (p = o->map_head.link_order;
p != NULL;
p = p->next)
{