summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-07-20 09:03:29 -0400
committerAustin Foxley <austinf@cetoncorp.com>2009-08-19 12:16:16 -0700
commit4d4b946c61cabc02eb4704a00e6696c5014469e1 (patch)
tree6764acb088f681f631d50843b24500a219b756f0
parente9a68c510f5eca18b94cf55d0c540ef9c72b9f85 (diff)
downloaduClibc-alpine-4d4b946c61cabc02eb4704a00e6696c5014469e1.tar.bz2
uClibc-alpine-4d4b946c61cabc02eb4704a00e6696c5014469e1.tar.xz
note that we do not want hidden malloc aliases
We want to let malloc() and friends be overridable at runtime so that apps can insert their own implementation (think debugging, specialized setups, etc...). That means that C library functions that return allocated memory have to go through the normal malloc() symbol as well as the external code is the one who will be calling free(). Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
-rw-r--r--include/stdlib.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/stdlib.h b/include/stdlib.h
index 52f02e4fd..f066199b1 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -482,6 +482,8 @@ extern int lcong48_r (unsigned short int __param[7],
__BEGIN_NAMESPACE_STD
/* Allocate SIZE bytes of memory. */
extern void *malloc (size_t __size) __THROW __attribute_malloc__ __wur;
+/* We want the malloc symbols overridable at runtime
+ * libc_hidden_proto(malloc) */
/* Allocate NMEMB elements of SIZE bytes each, all initialized to 0. */
extern void *calloc (size_t __nmemb, size_t __size)
__THROW __attribute_malloc__ __wur;