/* BFD back-end for binary objects.
Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+ 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>
This file is part of BFD, the Binary File Descriptor library.
a start symbol, an end symbol, and an absolute length symbol. */
#define BIN_SYMS 3
-/* Set by external programs - specifies the BFD architecture and
- machine number to be uses when creating binary BFDs. */
-enum bfd_architecture bfd_external_binary_architecture = bfd_arch_unknown;
-unsigned long bfd_external_machine = 0;
-
/* Create a binary object. Invoked via bfd_set_format. */
static bfd_boolean
abfd->tdata.any = (void *) sec;
- if (bfd_get_arch_info (abfd) != NULL)
- {
- if ((bfd_get_arch_info (abfd)->arch == bfd_arch_unknown)
- && (bfd_external_binary_architecture != bfd_arch_unknown))
- bfd_set_arch_info (abfd, bfd_lookup_arch
- (bfd_external_binary_architecture, bfd_external_machine));
- }
-
return abfd->xvec;
}
+ strlen (suffix)
+ sizeof "_binary__");
- buf = bfd_alloc (abfd, size);
+ buf = (char *) bfd_alloc (abfd, size);
if (buf == NULL)
return "";
unsigned int i;
bfd_size_type amt = BIN_SYMS * sizeof (asymbol);
- syms = bfd_alloc (abfd, amt);
+ syms = (asymbol *) bfd_alloc (abfd, amt);
if (syms == NULL)
return -1;