diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1994-03-10 02:09:10 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1994-03-10 02:09:10 +0000 |
commit | 80425e6c822142cc43999dece179009412b7f190 (patch) | |
tree | 5788e6f2593fec5f9c00be928c1b724578ce096e /bfd/libbfd-in.h | |
parent | cdc7029d493894306823754fead9f586ab8b0eb6 (diff) | |
download | gdb-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-in.h')
-rw-r--r-- | bfd/libbfd-in.h | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/bfd/libbfd-in.h b/bfd/libbfd-in.h index 3b867e64..7ed6bc4 100644 --- a/bfd/libbfd-in.h +++ b/bfd/libbfd-in.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. */ |