aboutsummaryrefslogtreecommitdiffstats
path: root/ports
diff options
context:
space:
mode:
authorPeter Seebach <peter.seebach@windriver.com>2014-07-11 14:35:43 -0500
committerPeter Seebach <peter.seebach@windriver.com>2014-07-11 14:35:43 -0500
commit512b84fb539c970464a93107995edf0e775d13fa (patch)
treeb0d80dc593cc1ae53455f782fca94d6e5721f288 /ports
parent97511c878d455805759caa7146906f552c49eb06 (diff)
downloadpseudo-512b84fb539c970464a93107995edf0e775d13fa.tar.gz
pseudo-512b84fb539c970464a93107995edf0e775d13fa.tar.bz2
pseudo-512b84fb539c970464a93107995edf0e775d13fa.zip
symbol version tweakspseudo-1.6.0PSEUDO_1_6_0
We don't want to pick up newer memcpy because pseudo sometimes has to run host binaries even when built against a newer libc.
Diffstat (limited to 'ports')
-rw-r--r--ports/linux/portdefs.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/ports/linux/portdefs.h b/ports/linux/portdefs.h
index 20ad529..60a8cc1 100644
--- a/ports/linux/portdefs.h
+++ b/ports/linux/portdefs.h
@@ -11,3 +11,17 @@
* causes errors; you have to leave it empty or specify AT_SYMLINK_FOLLOW.
*/
#define PSEUDO_LINK_SYMLINK_BEHAVIOR 0
+
+/* There were symbol changes that can cause the linker to request
+ * newer versions of glibc, which causes problems occasionally on
+ * older hosts if pseudo is built against a newer glibc and then
+ * run with an older one. Sometimes we can just avoid the symbols,
+ * but memcpy's pretty hard to get away from.
+ */
+#define GLIBC_COMPAT_SYMBOL(sym, ver) __asm(".symver " #sym "," #sym "@GLIBC_" #ver)
+
+#ifdef __amd64__
+GLIBC_COMPAT_SYMBOL(memcpy,2.2.5);
+#else /* tentatively assume this means x86 */
+GLIBC_COMPAT_SYMBOL(memcpy,2.0);
+#endif