Merge in changes from the 2.4.0 line. This basically brings in the
overhaul of the thread support. Many things are now probably broken,
but at least with --tool=none, simple and not-so-simple threaded and
non-thread programs work.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3265 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/ume.c b/coregrind/ume.c
index 38de1b0..f69ecdc 100644
--- a/coregrind/ume.c
+++ b/coregrind/ume.c
@@ -307,6 +307,7 @@
info->phnum = e->e.e_phnum;
info->entry = e->e.e_entry + ebase;
+ info->phdr = 0;
for(i = 0; i < e->e.e_phnum; i++) {
ESZ(Phdr) *ph = &e->p[i];
@@ -375,6 +376,9 @@
}
}
+ if (info->phdr == 0)
+ info->phdr = minaddr + e->e.e_phoff;
+
if (info->exe_base != info->exe_end) {
if (minaddr >= maxaddr ||
(minaddr + ebase < info->exe_base ||
@@ -417,6 +421,7 @@
entry = baseoff + interp->e.e_entry;
info->interp_base = (ESZ(Addr))base;
+ free(interp->p);
free(interp);
} else
entry = (void *)e->e.e_entry;
@@ -426,6 +431,7 @@
info->init_eip = (Addr)entry;
+ free(e->p);
free(e);
return 0;