From: Tom Hughes Date: Mon, 7 Nov 2005 18:06:10 +0000 (+0000) Subject: Initial description of multiple architecture support. X-Git-Tag: svn/VALGRIND_3_1_0~200 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41690bf0f4d3a499804ba0e606646fbd4a6f6aca;p=thirdparty%2Fvalgrind.git Initial description of multiple architecture support. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5032 --- diff --git a/docs/internals/multiple-architectures.txt b/docs/internals/multiple-architectures.txt new file mode 100644 index 0000000000..0f41e40b15 --- /dev/null +++ b/docs/internals/multiple-architectures.txt @@ -0,0 +1,78 @@ +------------------------------------------------------------------- +Guide to multiple architecture support +------------------------------------------------------------------- + +Valgrind supports systems where binaries for more than one architecture +can be run and will allow all sorts of binaries to be run under valgrind. + +To support this the valgrind build system can now build multiple versions +of the coregrind library and the VEX library and then build and link multiple +versions of each tool. + +The configure script selects which architectures to build support for +by defining a conditional for each platform that indicates whether or +not support for that platform should be built. There are currently three +such conditionals: + + VG_X86_LINUX + VG_AMD64_LINUX + VG_PPC32_LINUX + +On an amd64 system both VG_X86_LINUX and VG_AMD64_LINUX will be true +so that two versions of all the tools will be built. The coregrind +libraries will be named: + + libcoregrind_x86_linux.a + libcoregrind_amd64_linux.a + +and the VEX libraries: + + libvex_x86_linux.a + libvex_amd64_linux.a + +Each tool will then be built twice, along with any preload library +for the tool and the core preload libraries. At install time one +subdirectory will be created in the valgrind library directory for +each supported platforms and the tools and shared objects will be +installed in the appropriate place. On amd64 the result will be: + + /lib/valgrind + /lib/valgrind/default.supp + /lib/valgrind/glibc-2.4.supp + /lib/valgrind/hp2ps + /lib/valgrind/amd64-linux + /lib/valgrind/amd64-linux/vgpreload_core.so + /lib/valgrind/amd64-linux/vgpreload_massif.so + /lib/valgrind/amd64-linux/cachegrind + /lib/valgrind/amd64-linux/memcheck + /lib/valgrind/amd64-linux/helgrind + /lib/valgrind/amd64-linux/massif + /lib/valgrind/amd64-linux/vgpreload_memcheck.so + /lib/valgrind/amd64-linux/lackey + /lib/valgrind/amd64-linux/none + /lib/valgrind/amd64-linux/vgpreload_helgrind.so + /lib/valgrind/xfree-3.supp + /lib/valgrind/x86-linux + /lib/valgrind/x86-linux/vgpreload_core.so + /lib/valgrind/x86-linux/vgpreload_massif.so + /lib/valgrind/x86-linux/cachegrind + /lib/valgrind/x86-linux/memcheck + /lib/valgrind/x86-linux/helgrind + /lib/valgrind/x86-linux/massif + /lib/valgrind/x86-linux/vgpreload_memcheck.so + /lib/valgrind/x86-linux/lackey + /lib/valgrind/x86-linux/none + /lib/valgrind/x86-linux/vgpreload_helgrind.so + /lib/valgrind/glibc-2.3.supp + /lib/valgrind/xfree-4.supp + /lib/valgrind/glibc-2.2.supp + +The launcher program (ie the valgrind binary itself) is always +built as a native program (so a 64 bit program on amd64) but will +peek at the program which it is being asked to run and decide which +of the possible tools to run taking both the requested tool and the +format of the program being run into account. + +Because the execv system call is now routed back through the launcher +it is also possible to exec an x86 program from an amd64 program and +vice versa.