Checkin library infrastructure for building stuff to be linked with
gccld

llvm-svn: 1842
diff --git a/llvm/runtime/GCCLibraries/libc/memory.c b/llvm/runtime/GCCLibraries/libc/memory.c
new file mode 100644
index 0000000..404c81a
--- /dev/null
+++ b/llvm/runtime/GCCLibraries/libc/memory.c
@@ -0,0 +1,16 @@
+//===-- memory.c - String functions for the LLVM libc Library ----*- C -*-===//
+// 
+// A lot of this code is ripped gratuitously from glibc and libiberty.
+//
+//===----------------------------------------------------------------------===//
+
+#include <stdlib.h>
+
+void *malloc(unsigned);
+void free(void *);
+void *memset(void *, int, unsigned);
+
+void *calloc(size_t nelem, size_t elsize) {
+  void *Result = malloc(nelem*elsize);
+  return memset(Result, 0, nelem*elsize);
+}