aboutsummaryrefslogtreecommitdiff
path: root/bfd/libbfd.h
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1994-03-10 02:09:10 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1994-03-10 02:09:10 +0000
commit80425e6c822142cc43999dece179009412b7f190 (patch)
tree5788e6f2593fec5f9c00be928c1b724578ce096e /bfd/libbfd.h
parentcdc7029d493894306823754fead9f586ab8b0eb6 (diff)
downloadgdb-80425e6c822142cc43999dece179009412b7f190.zip
gdb-80425e6c822142cc43999dece179009412b7f190.tar.gz
gdb-80425e6c822142cc43999dece179009412b7f190.tar.bz2
* libbfd-in.h: Remove alloca cruft. It was missing some necessary
cruft (like the #pragma alloca for AIX). In addition to that problem, the C alloca calls xmalloc, which means checking for being out of memory can't work right. The following changes remove all uses of alloca from BFD. * hosts/solaris2.h: Remove alloca cruft. * som.c: Replace alloca with a fixed size auto array. * aoutx.h, elfcode.h, nlmcode.h, bout.c, coff-alpha.c, ecoff.c, ecofflink.c, elf32-hppa.c, elf32-mips.c, linker.c, reloc.c, som.c: Replace alloca with malloc and appropriate error checking and freeing. * linker.c: Replace alloca with obstack_alloc. * libbfd.h: Rebuilt.
Diffstat (limited to 'bfd/libbfd.h')
-rw-r--r--bfd/libbfd.h19
1 files changed, 1 insertions, 18 deletions
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index ccc21b7..c8b0532 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -19,13 +19,6 @@ 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., 675 Mass Ave, Cambridge, MA 02139, USA. */
-/* Use builtin alloca for gcc. */
-#ifdef __GNUC__
-#ifndef alloca
-#define alloca __builtin_alloca
-#endif
-#endif
-
/* Align an address upward to a boundary, expressed as a number of bytes.
E.g. align to an 8-byte boundary with argument of 8. */
#define BFD_ALIGN(this, boundary) \
@@ -73,17 +66,7 @@ struct areltdata {
#define arelt_size(bfd) (((struct areltdata *)((bfd)->arelt_data))->parsed_size)
-/* There is major inconsistency in how running out of memory is handled.
- Some routines return a NULL, and set bfd_error to no_memory.
- However, obstack routines can't do this ... */
-
char *bfd_zmalloc PARAMS ((bfd_size_type size));
-/* From libiberty. */
-extern PTR xmalloc PARAMS ((size_t));
-/* SIZE is bfd_size_type. */
-#define bfd_xmalloc(size) xmalloc ((size_t) size)
-/* Defined without an argument so its address can be used. */
-#define bfd_xmalloc_by_size_t xmalloc
/* These routines allocate and free things on the BFD's obstack. Note
that realloc can never occur in place. */
@@ -292,7 +275,7 @@ bfd_open_file PARAMS ((bfd *abfd));
FILE *
bfd_cache_lookup_worker PARAMS ((bfd *abfd));
-void
+boolean
bfd_constructor_entry PARAMS ((bfd *abfd,
asymbol **symbol_ptr_ptr,
CONST char*type));