From 9c2e764253356b5207267e64acbfb155713a3370 Mon Sep 17 00:00:00 2001 From: Geoffrey Keating Date: Fri, 1 Feb 2002 18:00:41 +0000 Subject: In ld/ChangeLog: * scripttempl/xstormy16.sc: Don't allocate extra space for the stack. In libgloss/ChangeLog: * xstormy16/Makefile.in (SIM_OBJS): Remove sbrk.o, add sim_malloc_start.o. * xstormy16/eva_app.ld: Add __malloc_start. * xstormy16/sbrk.c: Remove. * xstormy16/sim_malloc_start.s: New file. * xstormy16/sim_high.ld: Make the stack start immediately at the end of the program. In newlib/ChangeLog: * configure.host (xstormy16): Don't use the generic malloc. * libc/machine/xstormy16/Makefile.am: Build tiny-malloc. * libc/machine/xstormy16/Makefile.in: Regenerate. * libc/machine/xstormy16/mallocr.c: New file. * libc/machine/xstormy16/tiny-malloc.c: New file. --- newlib/libc/machine/xstormy16/mallocr.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 newlib/libc/machine/xstormy16/mallocr.c (limited to 'newlib/libc/machine/xstormy16/mallocr.c') diff --git a/newlib/libc/machine/xstormy16/mallocr.c b/newlib/libc/machine/xstormy16/mallocr.c new file mode 100644 index 000000000..23e02f74c --- /dev/null +++ b/newlib/libc/machine/xstormy16/mallocr.c @@ -0,0 +1,33 @@ +#include + +#ifdef DEFINE_MALLOC +_PTR +_malloc_r (struct _reent *r, size_t sz) +{ + return malloc (sz); +} +#endif + +#ifdef DEFINE_CALLOC +_PTR +_calloc_r (struct _reent *r, size_t a, size_t b) +{ + return calloc (a, b); +} +#endif + +#ifdef DEFINE_FREE +void +_free_r (struct _reent *r, _PTR x) +{ + free (x); +} +#endif + +#ifdef DEFINE_REALLOC +_PTR +_realloc_r (struct _reent *r, _PTR x, size_t sz) +{ + return realloc (x, sz); +} +#endif -- cgit v1.2.3