diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-09-19 07:57:22 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-09-19 07:57:22 +0000 |
commit | 452f9f695180b32a128de9b9a774a19b0a212734 (patch) | |
tree | cd8a166d736894427e3f887fdb20aeb412b1b990 /libc/stdlib | |
parent | 76bdc95e64bcede607b2b4306d8feca9129f3f15 (diff) |
fix assembler error. libc_hidden_data_def cannot work on COMMONs,
thus need to initialize stuff with 0 to force it into bss.
All hell can again break loose if future gcc will be smart enough
to ignore it.
Diffstat (limited to 'libc/stdlib')
-rw-r--r-- | libc/stdlib/__uc_malloc.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libc/stdlib/__uc_malloc.c b/libc/stdlib/__uc_malloc.c index 121fe08a4..fcc10ed59 100644 --- a/libc/stdlib/__uc_malloc.c +++ b/libc/stdlib/__uc_malloc.c @@ -24,8 +24,11 @@ Cambridge, MA 02139, USA. #include <unistd.h> #include <malloc.h> -void (*__uc_malloc_failed)(size_t size); -libc_hidden_data_def(__uc_malloc_failed); +void (*__uc_malloc_failed)(size_t size) = NULL; +/* Seemingly superfluous assigment of NULL above prevents gas error + * ("__uc_malloc_failed can't be equated to common symbol + * __GI___uc_malloc_failed") in libc_hidden_data_def: */ +libc_hidden_data_def(__uc_malloc_failed) void *__uc_malloc(size_t size) { @@ -40,4 +43,4 @@ void *__uc_malloc(size_t size) __uc_malloc_failed(size); } } -libc_hidden_def(__uc_malloc); +libc_hidden_def(__uc_malloc) |