From owner-p4-projects@FreeBSD.ORG Wed Oct 29 09:16:03 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3C20C106567D; Wed, 29 Oct 2008 09:16:03 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3D2F1065675 for ; Wed, 29 Oct 2008 09:16:02 +0000 (UTC) (envelope-from peter-gmail@wemm.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E1D328FC17 for ; Wed, 29 Oct 2008 09:16:02 +0000 (UTC) (envelope-from peter-gmail@wemm.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id m9T9G2vT087366 for ; Wed, 29 Oct 2008 09:16:02 GMT (envelope-from peter-gmail@wemm.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id m9T9G2TT087364 for perforce@freebsd.org; Wed, 29 Oct 2008 09:16:02 GMT (envelope-from peter-gmail@wemm.org) Date: Wed, 29 Oct 2008 09:16:02 GMT Message-Id: <200810290916.m9T9G2TT087364@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter-gmail@wemm.org using -f From: Peter Wemm To: Perforce Change Reviews Cc: Subject: PERFORCE change 152145 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Oct 2008 09:16:03 -0000 http://perforce.freebsd.org/chv.cgi?CH=152145 Change 152145 by peter@peter_overcee on 2008/10/29 09:15:52 Trim more linux junk guest_RDI is part of the freebsd-amd64 exec startup abi, but not linux. It helps to set it. Affected files ... .. //depot/projects/valgrind/coregrind/m_initimg/initimg-freebsd.c#3 edit Differences ... ==== //depot/projects/valgrind/coregrind/m_initimg/initimg-freebsd.c#3 (text+ko) ==== @@ -327,30 +327,6 @@ /*=== Setting up the client's stack ===*/ /*====================================================================*/ -#ifndef AT_DCACHEBSIZE -#define AT_DCACHEBSIZE 19 -#endif /* AT_DCACHEBSIZE */ - -#ifndef AT_ICACHEBSIZE -#define AT_ICACHEBSIZE 20 -#endif /* AT_ICACHEBSIZE */ - -#ifndef AT_UCACHEBSIZE -#define AT_UCACHEBSIZE 21 -#endif /* AT_UCACHEBSIZE */ - -#ifndef AT_SYSINFO -#define AT_SYSINFO 32 -#endif /* AT_SYSINFO */ - -#ifndef AT_SYSINFO_EHDR -#define AT_SYSINFO_EHDR 33 -#endif /* AT_SYSINFO_EHDR */ - -#ifndef AT_SECURE -#define AT_SECURE 23 /* secure mode boolean */ -#endif /* AT_SECURE */ - /* Add a string onto the string table, and return its address */ static char *copy_str(char **tab, const char *str) { @@ -676,27 +652,6 @@ auxv->u.a_val = info->entry; break; - case AT_DCACHEBSIZE: - case AT_ICACHEBSIZE: - case AT_UCACHEBSIZE: - break; - - case AT_SECURE: - /* If this is 1, then it means that this program is - running suid, and therefore the dynamic linker should - be careful about LD_PRELOAD, etc. However, since - stage1 (the thing the kernel actually execve's) should - never be SUID, and we need LD_PRELOAD to work for the - client, we set AT_SECURE to 0. */ - auxv->u.a_val = 0; - break; - - case AT_SYSINFO: - case AT_SYSINFO_EHDR: - /* Trash this, because we don't reproduce it */ - auxv->a_type = AT_IGNORE; - break; - default: /* stomp out anything we don't know about */ VG_(debugLog)(2, "initimg", @@ -940,7 +895,11 @@ /* Put essential stuff into the new state. */ arch->vex.guest_RSP = iifii.initial_client_SP; +//VG_(printf)("Initial SP %#lx\n", arch->vex.guest_RSP); + arch->vex.guest_RDI = iifii.initial_client_SP; +//VG_(printf)("Initial RDI %#lx\n", arch->vex.guest_RDI); arch->vex.guest_RIP = iifii.initial_client_IP; +//VG_(printf)("Initial IP %#lx\n", arch->vex.guest_RIP); # else # error Unknown platform