* ldmisc.c (ldmalloc, xmalloc, ldrealloc, xrealloc): Functions

deleted; will use libiberty versions instead.
	* ldctor.c ldfile.c ldlang.c ldmain.c ldmisc.c ldmisc.h lexsup.c
	mri.c Makefile.in: Change callers.

	* ldmisc.c (vfinfo): Remove cleanup code.
	* ldmain.c (remove_output): Put it here (new function).
	(preserve_output): New function.
	(main): Register remove_output and preserve_output with atexit.
	* ldmain.c ldgram.y: Call xexit instead of exit.
	* ldmisc.h: Declare xexit.
This commit is contained in:
David MacKenzie
1994-02-05 01:14:56 +00:00
parent 6adfba803c
commit 0b2f8d2edd
4 changed files with 54 additions and 18 deletions

View File

@ -1,5 +1,5 @@
/* Linker command language support.
Copyright 1991, 1992, 1993 Free Software Foundation, Inc.
Copyright (C) 1991, 92, 93, 94 Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@ -44,7 +44,7 @@ static lang_statement_union_type *new_statement PARAMS ((enum statement_enum,
/* LOCALS */
static struct obstack stat_obstack;
#define obstack_chunk_alloc ldmalloc
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free
static CONST char *startup_file;
static lang_statement_list_type input_file_chain;
@ -1777,7 +1777,7 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
unsigned int symsize;
symsize = get_symtab_upper_bound (i->owner);
is->ifile->asymbols = (asymbol **) ldmalloc (symsize);
is->ifile->asymbols = (asymbol **) xmalloc (symsize);
is->ifile->symbol_count =
bfd_canonicalize_symtab (i->owner, is->ifile->asymbols);