PERFORCE change 152612 for review
Peter Wemm
peter at FreeBSD.org
Thu Nov 6 20:13:00 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=152612
Change 152612 by peter at peter_hammer on 2008/11/07 04:12:06
Deal with execing 32 bit binaries and the interpreter subterfuge
Affected files ...
.. //depot/projects/valgrind/coregrind/m_ume.c#5 edit
Differences ...
==== //depot/projects/valgrind/coregrind/m_ume.c#5 (text+ko) ====
@@ -401,6 +401,14 @@
buf[ph->p_filesz] = '\0';
//VG_(printf)("interpreter is %s\n", buf);
+#if defined(VGP_x86_freebsd)
+ /* Hack. FreeBSD's kernel overloads the interpreter name. */
+ if (VG_(strcmp)(buf, "/libexec/ld-elf.so.1") == 0 ||
+ VG_(strcmp)(buf, "/usr/libexec/ld-elf.so.1") == 0) {
+ sres = VG_(open)("/libexec/ld-elf32.so.1", VKI_O_RDONLY, 0);
+ }
+ if (sres.isError)
+#endif
sres = VG_(open)(buf, VKI_O_RDONLY, 0);
if (sres.isError) {
VG_(printf)("valgrind: m_ume.c: can't open interpreter\n");
More information about the p4-projects
mailing list