/* NLM (NetWare Loadable Module) executable support for BFD.
- Copyright (C) 1993 Free Software Foundation, Inc.
+ Copyright (C) 1993, 94, 95, 98, 1999 Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, using ELF support as the
template.
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-#include <string.h> /* For strrchr and friends */
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
/* Read in the fixed length portion of the NLM header in external format. */
- x_fxdhdr = (PTR) malloc ((size_t) nlm_fixed_header_size (abfd));
+ x_fxdhdr = (PTR) bfd_malloc ((size_t) nlm_fixed_header_size (abfd));
if (x_fxdhdr == NULL)
- {
- bfd_set_error (bfd_error_no_memory);
- goto got_no_match;
- }
+ goto got_no_match;
if (bfd_read ((PTR) x_fxdhdr, nlm_fixed_header_size (abfd), 1, abfd) !=
nlm_fixed_header_size (abfd))
void
nlm_get_symbol_info (ignore_abfd, symbol, ret)
- bfd *ignore_abfd;
+ bfd *ignore_abfd ATTRIBUTE_UNUSED;
asymbol *symbol;
symbol_info *ret;
{
void
nlm_print_symbol (abfd, afile, symbol, how)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
PTR afile;
asymbol *symbol;
bfd_print_symbol_type how;
unsigned char *fixed_header = NULL;
fixed_header = ((unsigned char *)
- malloc ((size_t) nlm_fixed_header_size (abfd)));
+ bfd_malloc ((size_t) nlm_fixed_header_size (abfd)));
if (fixed_header == NULL)
- {
- bfd_set_error (bfd_error_no_memory);
- goto error_return;
- }
+ goto error_return;
if (abfd->output_has_begun == false
&& nlm_compute_section_file_positions (abfd) == false)