diff options
Diffstat (limited to 'libebl/eblopenbackend.c')
| -rw-r--r-- | libebl/eblopenbackend.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c index aa75b957..0b261e74 100644 --- a/libebl/eblopenbackend.c +++ b/libebl/eblopenbackend.c @@ -313,20 +313,21 @@ openbackend (Elf *elf, const char *emulation, GElf_Half machine) # define LIBEBL_SUBDIR PACKAGE #endif #define ORIGINDIR "$ORIGIN/../$LIB/" LIBEBL_SUBDIR "/" +#define LIBEBL_PREFIX LIBPREFIX "ebl_" /* Give it a try. At least the machine type matches. First try to load the module. */ char dsoname[100]; - strcpy (stpcpy (stpcpy (dsoname, ORIGINDIR "libebl_"), + strcpy (stpcpy (stpcpy (dsoname, ORIGINDIR LIBEBL_PREFIX), machines[cnt].dsoname), - ".so"); + LIBEXT); void *h = dlopen (dsoname, RTLD_LAZY); if (h == NULL) { - strcpy (stpcpy (stpcpy (dsoname, "libebl_"), + strcpy (stpcpy (stpcpy (dsoname, LIBEBL_PREFIX), machines[cnt].dsoname), - ".so"); + LIBEXT); h = dlopen (dsoname, RTLD_LAZY); } |
