+/*
+ * Ugly hack for ISE 12. Preload doesn't seem to work correctly for
+ * libImpactComm.so. Even though the file is still read with fopen(),
+ * the version from libc is used and not the one from this file.
+ * Replace the function calling fopen() instead...
+ * echo '_Z14isModuleLoadedPci' | c++filt
+ */
+long int _Z14isModuleLoadedPci(char *module_name, int i) {
+ DPRINTF("_Z14isModuleLoadedPci: Checking for module %s (%d)\n", module_name, i);
+
+ return 1;
+}
+
+/* XilCommNS::CPortResources::Instance() */
+void* _ZN9XilCommNS14CPortResources8InstanceEv() {
+ static void* (*func) (void) = NULL;
+ void *ret;
+
+ if (!func)
+ func = (void* (*) (void)) dlsym(RTLD_NEXT, "_ZN9XilCommNS14CPortResources8InstanceEv");
+
+ DPRINTF("-> XilCommNS::CPortResources::Instance()\n");
+
+ ret = func();
+
+#ifdef DEBUG
+ hexdump(ret, 0x29, "<-");
+ #if 0
+ {
+ void *portinfo;
+ portinfo = ((unsigned char**)ret+0x00);
+ hexdump(portinfo, 256, "PI");
+ hexdump(portinfo+0x50, 4, "BS");
+ hexdump(portinfo+0x54, 4, "BE");
+ hexdump(portinfo+0x58, 4, "ES");
+ hexdump(portinfo+0x5c, 4, "EE");