From 30c01cb08a47b706a4ae49ddbd28f39cb065b5c9 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 6 Oct 2014 05:06:06 +0200
Subject: [PATCH] dbghelp: Always check for debug symbols in BINDIR.

---
 dlls/dbghelp/Makefile.in  | 2 +-
 dlls/dbghelp/elf_module.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/dbghelp/Makefile.in b/dlls/dbghelp/Makefile.in
index 076c50323dda..ddb69c96dd42 100644
--- a/dlls/dbghelp/Makefile.in
+++ b/dlls/dbghelp/Makefile.in
@@ -1,6 +1,6 @@
 MODULE    = dbghelp.dll
 IMPORTLIB = dbghelp
-EXTRADEFS = -D_IMAGEHLP_SOURCE_
+EXTRADEFS = -D_IMAGEHLP_SOURCE_ -DBINDIR="\"${bindir}\""
 DELAYIMPORTS = version
 
 EXTRADLLFLAGS = -mno-cygwin
diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c
index e44629f016e1..923608f35e31 100644
--- a/dlls/dbghelp/elf_module.c
+++ b/dlls/dbghelp/elf_module.c
@@ -1436,6 +1436,7 @@ static BOOL elf_search_and_load_file(struct process* pcs, const WCHAR* filename,
         load_elf.elf_info    = elf_info;
 
         ret = search_unix_path(filename, process_getenv(pcs, L"LD_LIBRARY_PATH"), elf_load_file_cb, &load_elf)
+            || search_unix_path(filename, BINDIR, elf_load_file_cb, &load_elf)
             || search_dll_path(pcs, filename, elf_load_file_cb, &load_elf);
     }
 
-- 
2.26.2

