summaryrefslogtreecommitdiffstats
path: root/deps/jemalloc/include/jemalloc/jemalloc_rename.sh
diff options
context:
space:
mode:
Diffstat (limited to 'deps/jemalloc/include/jemalloc/jemalloc_rename.sh')
-rwxr-xr-xdeps/jemalloc/include/jemalloc/jemalloc_rename.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/deps/jemalloc/include/jemalloc/jemalloc_rename.sh b/deps/jemalloc/include/jemalloc/jemalloc_rename.sh
new file mode 100755
index 0000000..f943891
--- /dev/null
+++ b/deps/jemalloc/include/jemalloc/jemalloc_rename.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+public_symbols_txt=$1
+
+cat <<EOF
+/*
+ * Name mangling for public symbols is controlled by --with-mangling and
+ * --with-jemalloc-prefix. With default settings the je_ prefix is stripped by
+ * these macro definitions.
+ */
+#ifndef JEMALLOC_NO_RENAME
+EOF
+
+for nm in `cat ${public_symbols_txt}` ; do
+ n=`echo ${nm} |tr ':' ' ' |awk '{print $1}'`
+ m=`echo ${nm} |tr ':' ' ' |awk '{print $2}'`
+ echo "# define je_${n} ${m}"
+done
+
+cat <<EOF
+#endif
+EOF