Make all memory functions have weak linkage so that they can be overridden with

custom memory-management implementations (e.g., bash).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10478 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Misha Brukman 2003-12-15 22:32:50 +00:00
parent 9e45d2e0e8
commit a5df0cdbe2

View File

@ -6,9 +6,10 @@
#include <stdlib.h> #include <stdlib.h>
void *malloc(size_t); void *malloc(size_t) __attribute__((weak));
void free(void *); void free(void *) __attribute__((weak));
void *memset(void *, int, size_t); 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 *calloc(size_t nelem, size_t elsize) {
void *Result = malloc(nelem*elsize); void *Result = malloc(nelem*elsize);