Date: Fri, 7 Nov 2008 04:12:59 GMT From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 152612 for review Message-ID: <200811070412.mA74CxOc077849@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=152612 Change 152612 by peter@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");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811070412.mA74CxOc077849>