From abd9714a7b233a8f163d57223719ee882bcb2213 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Tue, 24 Jan 2012 06:29:01 +0000 Subject: [PATCH] * ldd.cc (start_process): Handle .oct and .so as DLLs. --- winsup/utils/ChangeLog | 4 ++++ winsup/utils/ldd.cc | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index 489a0e363..858d6bc18 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,3 +1,7 @@ +2012-01-24 Yaakov Selkowitz + + * ldd.cc (start_process): Handle .oct and .so as DLLs. + 2011-12-22 Corinna Vinschen * Makefile.in (ps.exe): Revert previous change. diff --git a/winsup/utils/ldd.cc b/winsup/utils/ldd.cc index 6cefeb8af..fa771b288 100644 --- a/winsup/utils/ldd.cc +++ b/winsup/utils/ldd.cc @@ -189,7 +189,11 @@ start_process (const wchar_t *fn, bool& isdll) PROCESS_INFORMATION pi; si.cb = sizeof (si); wchar_t *cmd; - if (wcslen (fn) < 4 || wcscasecmp (wcschr (fn, L'\0') - 4, L".dll") != 0) + /* OCaml natdynlink plugins (.cmxs) cannot be handled by ldd because they + can only be loaded by flexdll_dlopen() */ + if (wcslen (fn) < 4 || (wcscasecmp (wcschr (fn, L'\0') - 4, L".dll") != 0 + && wcscasecmp (wcschr (fn, L'\0') - 4, L".oct") != 0 + && wcscasecmp (wcschr (fn, L'\0') - 3, L".so") != 0)) { cmd = wcsdup (fn); isdll = false;