This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
[PATCH] Provide a windows-specific ORIGINDIR for eblopenbackend
- From: Ulf Hermann <ulf dot hermann at qt dot io>
- To: <elfutils-devel at sourceware dot org>
- Date: Thu, 4 May 2017 16:22:45 +0200
- Subject: [PATCH] Provide a windows-specific ORIGINDIR for eblopenbackend
- Authentication-results: sourceware.org; auth=none
- Authentication-results: sourceware.org; dkim=none (message not signed) header.d=none;sourceware.org; dmarc=none action=none header.from=qt.io;
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qtcompany.onmicrosoft.com; s=selector1-qt-io; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=wEWMXm17vc7gOftVGvc9s/BpQc0RMRp92H7fhtB0kso=; b=M4goXfWwbceqVmKr5PhPhnRgRMs6J0c1b9q9h6WbTI0TxtsGBGs5CP5PsFB3wmZlJwjoGCX18sFY8jYc+fQzwTr+CZdbhK2h7LX2AmxgbExiWUaLRcD/EcxLJCsgp6SJU6j3GKCkMnyX9+ULzAgyYR4SVJ3jnR03/uO8YOzGcuM=
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
$ORIGIN and $LIB are not supported by all implementations of dlopen() and
on windows we need backslashes as directory separators.
Signed-off-by: Ulf Hermann <ulf.hermann@qt.io>
---
libebl/ChangeLog | 5 +++++
libebl/eblopenbackend.c | 4 ++++
2 files changed, 9 insertions(+)
diff --git a/libebl/ChangeLog b/libebl/ChangeLog
index f9f5d89..7de7236 100644
--- a/libebl/ChangeLog
+++ b/libebl/ChangeLog
@@ -1,3 +1,8 @@
+2017-05-04 Ulf Hermann <ulf.hermann@qt.io>
+
+ * eblopenbackend.c: On windows use an ORIGINDIR without $ORIGIN and
+ $LIB.
+
2017-04-28 Ulf Hermann <ulf.hermann@qt.io>
* Makefile.am: Forward LIBPREFIX and LIBEXT as defined by configure.
diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c
index 0b261e7..4048f12 100644
--- a/libebl/eblopenbackend.c
+++ b/libebl/eblopenbackend.c
@@ -312,7 +312,11 @@ openbackend (Elf *elf, const char *emulation, GElf_Half machine)
#ifndef LIBEBL_SUBDIR
# define LIBEBL_SUBDIR PACKAGE
#endif
+#if (defined _WIN32 || defined __WIN32__)
+#define ORIGINDIR "..\\lib\\" LIBEBL_SUBDIR "\\"
+#else
#define ORIGINDIR "$ORIGIN/../$LIB/" LIBEBL_SUBDIR "/"
+#endif
#define LIBEBL_PREFIX LIBPREFIX "ebl_"
/* Give it a try. At least the machine type matches. First
--
2.1.4