PERFORCE change 152145 for review
Peter Wemm
peter at FreeBSD.org
Wed Oct 29 09:16:03 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=152145
Change 152145 by peter at 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
More information about the p4-projects
mailing list