From: Ulf Hermann <ulf.hermann@qt.io>
To: <elfutils-devel@sourceware.org>
Subject: [PATCH] Provide a windows-specific ORIGINDIR for eblopenbackend
Date: Thu, 04 May 2017 15:08:00 -0000 [thread overview]
Message-ID: <90bdc3c6-4f2c-b0d3-bc77-b034538b32f3@qt.io> (raw)
$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
reply other threads:[~2017-05-04 14:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=90bdc3c6-4f2c-b0d3-bc77-b034538b32f3@qt.io \
--to=ulf.hermann@qt.io \
--cc=elfutils-devel@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).