From 5407eed84b98056a5af7d95007d8d511ebad60e4 Mon Sep 17 00:00:00 2001 From: Pavel Chupin Date: Mon, 9 Dec 2013 18:08:48 +0400 Subject: [PATCH] Fix debugging issues in vdso handling Under valgrind ehdr_vdso is null and causing segfault. Adding debug info for vdso producing plenty of issues on debugging through gdbserver, removing it. It doesn't seem it should be here. Unwinding through vdso test still works. Change-Id: I1a7e233c493f2268d725fa8d7279822d07decc49 Signed-off-by: Pavel Chupin --- linker/linker.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/linker/linker.cpp b/linker/linker.cpp index fe4d6c49a..6ebba8e2f 100755 --- a/linker/linker.cpp +++ b/linker/linker.cpp @@ -1750,6 +1750,9 @@ static bool soinfo_link_image(soinfo* si) { static void add_vdso(KernelArgumentBlock& args UNUSED) { #if defined(AT_SYSINFO_EHDR) Elf_Ehdr* ehdr_vdso = reinterpret_cast(args.getauxval(AT_SYSINFO_EHDR)); + if (ehdr_vdso == NULL) { + return; + } soinfo* si = soinfo_alloc("[vdso]"); @@ -1761,7 +1764,6 @@ static void add_vdso(KernelArgumentBlock& args UNUSED) { si->load_bias = get_elf_exec_load_bias(ehdr_vdso); soinfo_link_image(si); - insert_soinfo_into_debug_map(si); #endif }