Fix some tiny bugs which prevented Valgrind from running static executables. coregrind/ume.c | 4 ++++ 1 files changed, 4 insertions(+) diff -puN coregrind/ume.c~fix-static-exec coregrind/ume.c --- valgrind/coregrind/ume.c~fix-static-exec 2005-01-10 16:40:47.000000000 -0800 +++ valgrind-jeremy/coregrind/ume.c 2005-01-10 16:40:47.000000000 -0800 @@ -305,6 +305,7 @@ static int load_ELF(char *hdr, int len, 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]; @@ -373,6 +374,9 @@ static int load_ELF(char *hdr, int len, } } + 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 || _