aboutsummaryrefslogtreecommitdiff
path: root/system/lib/dlmalloc.c
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-03-25 12:58:25 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-03-25 12:58:25 -0700
commitad285f60d0be807e7e49e7c86ca8f9bedec4714f (patch)
tree67768bb7707d6672659597abc295345109b3fbce /system/lib/dlmalloc.c
parent09221ebd18ec0074b25d593400f040ee460526aa (diff)
remove symbol removing hack; export all malloc symbols as weak; add test for a case where symbol removing made us not merge llvm constructors properly1.3.5
Diffstat (limited to 'system/lib/dlmalloc.c')
-rw-r--r--system/lib/dlmalloc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/system/lib/dlmalloc.c b/system/lib/dlmalloc.c
index 7e04a726..9a84d48f 100644
--- a/system/lib/dlmalloc.c
+++ b/system/lib/dlmalloc.c
@@ -532,6 +532,10 @@
#define DLMALLOC_VERSION 20806
#endif /* DLMALLOC_VERSION */
+#if EMSCRIPTEN
+#define DLMALLOC_EXPORT __attribute__((__weak__, __visibility__("default")))
+#endif
+
#ifndef DLMALLOC_EXPORT
#define DLMALLOC_EXPORT extern
#endif
@@ -6291,4 +6295,4 @@ int mspace_mallopt(int param_number, int value) {
* Based loosely on libg++-1.2X malloc. (It retains some of the overall
structure of old version, but most details differ.)
- */ \ No newline at end of file
+ */