summaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
Diffstat (limited to 'make')
-rw-r--r--make/scripts/check-glibc-version.sh8
-rw-r--r--make/stub_includes/platform/glibc-compat-symbols.h15
2 files changed, 23 insertions, 0 deletions
diff --git a/make/scripts/check-glibc-version.sh b/make/scripts/check-glibc-version.sh
new file mode 100644
index 0000000..aa5f5cc
--- /dev/null
+++ b/make/scripts/check-glibc-version.sh
@@ -0,0 +1,8 @@
+#! /bin/sh
+
+if [ -z "$1" ] ; then
+ echo Usage $0 library-file
+ exit 1
+fi
+
+objdump -T $1 | grep GLIBC | awk ' { print $5 " " $6 } ' | sort
diff --git a/make/stub_includes/platform/glibc-compat-symbols.h b/make/stub_includes/platform/glibc-compat-symbols.h
new file mode 100644
index 0000000..482e232
--- /dev/null
+++ b/make/stub_includes/platform/glibc-compat-symbols.h
@@ -0,0 +1,15 @@
+#ifndef __GLIBC_COMPAT_SYMBOLS_H__
+#define __GLIBC_COMPAT_SYMBOLS_H__ 1
+
+/**
+ * add other architecures below
+ */
+#ifdef __amd64__
+ #define GLIBC_COMPAT_SYMBOL(FFF) __asm__(".symver " #FFF "," #FFF "@GLIBC_2.2.5");
+#else
+ #define GLIBC_COMPAT_SYMBOL(FFF) __asm__(".symver " #FFF "," #FFF "@GLIBC_2.0");
+#endif /*__amd64__*/
+
+GLIBC_COMPAT_SYMBOL(memcpy)
+
+#endif /*__GLIBC_COMPAT_SYMBOLS_H__*/