From 918b1c1d177b5e3cf22a8aae4a01776495fdc3bc Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Wed, 4 Nov 2015 21:41:29 -0500 Subject: remove external linkage from __simple_malloc definition this function is used only as a weak definition for malloc, for static linking in programs which do not call realloc or free. since it had external linkage and was thereby exported in libc.so's dynamic symbol table, --gc-sections was unable to drop it. this was merely an oversight; there's no reason for it to be external, so make it static. --- src/malloc/lite_malloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/malloc/lite_malloc.c') diff --git a/src/malloc/lite_malloc.c b/src/malloc/lite_malloc.c index 09ac5755..a7e4a9f7 100644 --- a/src/malloc/lite_malloc.c +++ b/src/malloc/lite_malloc.c @@ -8,7 +8,7 @@ void *__expand_heap(size_t *); -void *__simple_malloc(size_t n) +static void *__simple_malloc(size_t n) { static char *cur, *end; static volatile int lock[2]; -- cgit v1.2.1