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 <pavel.v.chupin@intel.com>
diff --git a/linker/linker.cpp b/linker/linker.cpp
index fe4d6c4..6ebba8e 100755
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -1750,6 +1750,9 @@
static void add_vdso(KernelArgumentBlock& args UNUSED) {
#if defined(AT_SYSINFO_EHDR)
Elf_Ehdr* ehdr_vdso = reinterpret_cast<Elf_Ehdr*>(args.getauxval(AT_SYSINFO_EHDR));
+ if (ehdr_vdso == NULL) {
+ return;
+ }
soinfo* si = soinfo_alloc("[vdso]");
@@ -1761,7 +1764,6 @@
si->load_bias = get_elf_exec_load_bias(ehdr_vdso);
soinfo_link_image(si);
- insert_soinfo_into_debug_map(si);
#endif
}