/* BFD back-end for PDP-11 a.out binaries.
- Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
+ Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
/* The header is not included in the text segment. */
#define N_HEADER_IN_TEXT(x) 0
-/* There are no shared libraries. */
-#define N_SHARED_LIB(x) 0
-
/* There is no flags field. */
#define N_FLAGS(exec) 0
NAME (aout, make_empty_symbol) (bfd *abfd)
{
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;
- 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. */
bfd_boolean copy)
{
bfd_boolean hash;
- bfd_size_type index;
+ bfd_size_type str_index;
/* An index of 0 always means the empty string. */
if (str == 0 || *str == '\0')
if ((abfd->flags & BFD_TRADITIONAL_FORMAT) != 0)
hash = FALSE;
- index = _bfd_stringtab_add (tab, str, hash, copy);
+ str_index = _bfd_stringtab_add (tab, str, hash, copy);
- if (index != (bfd_size_type) -1)
+ if (str_index != (bfd_size_type) -1)
/* Add BYTES_IN_LONG to the return value to account for the
space taken up by the string table size. */
- index += BYTES_IN_LONG;
+ str_index += BYTES_IN_LONG;
- return index;
+ return str_index;
}
/* Write out a strtab. ABFD is already at the right location in the
char *strings;
struct aout_link_hash_entry **sym_hashes;
int *symbol_map;
- bfd_size_type reloc_count;
bfd_byte *rel;
bfd_byte *rel_end;
sym_hashes = obj_aout_sym_hashes (input_bfd);
symbol_map = finfo->symbol_map;
- reloc_count = rel_size / RELOC_SIZE;
rel = relocs;
rel_end = rel + rel_size;
for (; rel < rel_end; rel += RELOC_SIZE)
static bfd_boolean
aout_link_input_bfd (struct aout_final_link_info *finfo, bfd *input_bfd)
{
- bfd_size_type sym_count;
-
BFD_ASSERT (bfd_get_format (input_bfd) == bfd_object);
/* If this is a dynamic object, it may need special handling. */
if (! aout_get_external_symbols (input_bfd))
return FALSE;
- sym_count = obj_aout_external_sym_count (input_bfd);
-
/* Write out the symbols and get a map of the new indices. The map
is placed into finfo->symbol_map. */
if (! aout_link_write_symbols (finfo, input_bfd))