[llvm-commits] CVS: llvm/runtime/GCCLibraries/libc/memory.c
Misha Brukman
brukman at cs.uiuc.edu
Mon Dec 15 16:34:03 PST 2003
Changes in directory llvm/runtime/GCCLibraries/libc:
memory.c updated: 1.2 -> 1.3
---
Log message:
Make all memory functions have weak linkage so that they can be overridden with
custom memory-management implementations (e.g., bash).
---
Diffs of the changes: (+4 -3)
Index: llvm/runtime/GCCLibraries/libc/memory.c
diff -u llvm/runtime/GCCLibraries/libc/memory.c:1.2 llvm/runtime/GCCLibraries/libc/memory.c:1.3
--- llvm/runtime/GCCLibraries/libc/memory.c:1.2 Wed Jul 17 19:15:29 2002
+++ llvm/runtime/GCCLibraries/libc/memory.c Mon Dec 15 16:32:50 2003
@@ -6,9 +6,10 @@
#include <stdlib.h>
-void *malloc(size_t);
-void free(void *);
-void *memset(void *, int, size_t);
+void *malloc(size_t) __attribute__((weak));
+void free(void *) __attribute__((weak));
+void *memset(void *, int, size_t) __attribute__((weak));
+void *calloc(size_t nelem, size_t elsize) __attribute__((weak));
void *calloc(size_t nelem, size_t elsize) {
void *Result = malloc(nelem*elsize);
More information about the llvm-commits
mailing list