|
From: Bart V. A. <bar...@gm...> - 2007-01-06 12:32:21
|
Hello, Probably I overlooked something simple, but although drd compiles cleanly on a freshly-installed x86_64 setup, the drd tool refuses to load any 64-bit executables. Anyone any idea ? $ uname -a Linux athlon 2.6.18.2-34-default #1 SMP Mon Nov 27 11:46:27 UTC 2006 x86_64 x86_64 x86_64 GNU/Linux $ VALGRIND_LIB=.in_place coregrind/valgrind --tool=none drd/tests/fp_race ==8675== Nulgrind, a binary JIT-compiler. ==8675== Copyright (C) 2002-2006, and GNU GPL'd, by Nicholas Nethercote. ==8675== Using LibVEX rev 1717, a library for dynamic binary translation. ==8675== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP. ==8675== Using valgrind-3.3.0.SVN, a dynamic binary instrumentation framework. ==8675== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al. ==8675== For more details, rerun with: -v ==8675== &s_d1 = 0x6020e8; &s_d2 = 0x6020f0; &s_d3 = 0x6020f8 ==8675== $ VALGRIND_LIB=.in_place coregrind/valgrind --v -tool=drd drd/tests/fp_race valgrind: wrong ELF executable class (eg. 32-bit instead of 64-bit) valgrind: drd/tests/fp_race: cannot execute binary file $ file drd/tests/fp_race drd/tests/fp_race: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.4, dynamically linked (uses shared libs), for GNU/Linux 2.6.4, not stripped Bart. |
|
From: Tom H. <to...@co...> - 2007-01-06 14:19:01
|
In message <e2e...@ma...>
"Bart Van Assche" <bar...@gm...> wrote:
> $ uname -a
> Linux athlon 2.6.18.2-34-default #1 SMP Mon Nov 27 11:46:27 UTC 2006 x86_64
> x86_64 x86_64 GNU/Linux
>
> $ VALGRIND_LIB=.in_place coregrind/valgrind --tool=none drd/tests/fp_race
> ==8675== Nulgrind, a binary JIT-compiler.
> ==8675== Copyright (C) 2002-2006, and GNU GPL'd, by Nicholas Nethercote.
> ==8675== Using LibVEX rev 1717, a library for dynamic binary translation.
> ==8675== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
> ==8675== Using valgrind-3.3.0.SVN, a dynamic binary instrumentation
> framework.
> ==8675== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al.
> ==8675== For more details, rerun with: -v
> ==8675==
> &s_d1 = 0x6020e8; &s_d2 = 0x6020f0; &s_d3 = 0x6020f8
> ==8675==
>
> $ VALGRIND_LIB=.in_place coregrind/valgrind --v -tool=drd drd/tests/fp_race
> valgrind: wrong ELF executable class (eg. 32-bit instead of 64-bit)
> valgrind: drd/tests/fp_race: cannot execute binary file
Add a -d and we'll see which backend valgrind is choosing.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: Bart V. A. <bar...@gm...> - 2007-01-06 14:54:49
|
On 1/6/07, Tom Hughes <to...@co...> wrote: > > In message <e2e...@ma...> > "Bart Van Assche" <bar...@gm...> wrote: > > > $ uname -a > > Linux athlon 2.6.18.2-34-default #1 SMP Mon Nov 27 11:46:27 UTC 2006 > x86_64 > > x86_64 x86_64 GNU/Linux > > > > $ VALGRIND_LIB=.in_place coregrind/valgrind --v -tool=drd > drd/tests/fp_race > > valgrind: wrong ELF executable class (eg. 32-bit instead of 64-bit) > > valgrind: drd/tests/fp_race: cannot execute binary file > > Add a -d and we'll see which backend valgrind is choosing. > > Tom > This is the resulting output: $ VALGRIND_LIB=.in_place coregrind/valgrind -d --tool=drd drd/tests/fp_race --3850:1:debuglog DebugLog system started by Stage 1, level 1 logging requested --3850:1:launcher tool 'drd' requested --3850:1:launcher selected platform 'amd64-linux' --3850:1:launcher launching .in_place/amd64-linux/drd --3850:1:debuglog DebugLog system started by Stage 2 (main), level 1 logging requested --3850:1:main Welcome to Valgrind version 3.3.0.SVN debug logging --3850:1:main Checking current stack is plausible --3850:1:main Checking initial stack was noted --3850:1:main Starting the address space manager --3850:1:main Address space manager is running --3850:1:main Starting the dynamic memory manager --3850:1:mallocfr newSuperblock at 0x4000000 (pszB 1048560) owner VALGRIND/tool --3850:1:main Dynamic memory manager is running --3850:1:main Getting stage1's name --3850:1:main Get hardware capabilities ... --3850:1:main ... arch = X86, hwcaps = x86-sse1-sse2 --3850:1:main Split up command line --3850:1:main Preprocess command line opts --3850:1:main Create initial image --3850:1:initimg Loading client valgrind: wrong ELF executable class (eg. 32-bit instead of 64-bit) valgrind: drd/tests/fp_race: cannot execute binary file It surprised me to see "arch = X86" in the output instead of "arch = AMD64" ? Bart. |
|
From: Julian S. <js...@ac...> - 2007-01-06 15:10:27
|
What happens if you run from the install tree? J > --3850:1:main Dynamic memory manager is running > --3850:1:main Getting stage1's name > --3850:1:main Get hardware capabilities ... > --3850:1:main ... arch = X86, hwcaps = x86-sse1-sse2 > --3850:1:main Split up command line > --3850:1:main Preprocess command line opts > --3850:1:main Create initial image > --3850:1:initimg Loading client > valgrind: wrong ELF executable class (eg. 32-bit instead of 64-bit) > valgrind: drd/tests/fp_race: cannot execute binary file > > It surprised me to see "arch = X86" in the output instead of "arch = AMD64" > ? > > Bart. |
|
From: Tom H. <to...@co...> - 2007-01-06 15:04:44
|
In message <e2e...@ma...> you wrote: > This is the resulting output: > > $ VALGRIND_LIB=.in_place coregrind/valgrind -d --tool=drd drd/tests/fp_race > --3850:1:debuglog DebugLog system started by Stage 1, level 1 logging > requested > --3850:1:launcher tool 'drd' requested > --3850:1:launcher selected platform 'amd64-linux' > --3850:1:launcher launching .in_place/amd64-linux/drd So it thinks it is launching a 64 bit tool... > --3850:1:debuglog DebugLog system started by Stage 2 (main), level 1 logging > requested > --3850:1:main Welcome to Valgrind version 3.3.0.SVN debug logging > --3850:1:main Checking current stack is plausible > --3850:1:main Checking initial stack was noted > --3850:1:main Starting the address space manager > --3850:1:main Address space manager is running > --3850:1:main Starting the dynamic memory manager > --3850:1:mallocfr newSuperblock at 0x4000000 (pszB 1048560) owner > VALGRIND/tool > --3850:1:main Dynamic memory manager is running > --3850:1:main Getting stage1's name > --3850:1:main Get hardware capabilities ... > --3850:1:main ... arch = X86, hwcaps = x86-sse1-sse2 ...but the tool actually seems to be a 32 bit one. > --3850:1:main Split up command line > --3850:1:main Preprocess command line opts > --3850:1:main Create initial image > --3850:1:initimg Loading client > valgrind: wrong ELF executable class (eg. 32-bit instead of 64-bit) > valgrind: drd/tests/fp_race: cannot execute binary file > > It surprised me to see "arch = X86" in the output instead of "arch = AMD64"? I think you will find that .in_place/amd64-linux/drd is a 32 bit program - it should be a 64 bit one. There must be something wrong with your build scripts I think. Tom -- Tom Hughes (to...@co...) http://www.compton.nu/ |
|
From: Bart V. A. <bar...@gm...> - 2007-01-06 15:27:34
|
On 1/6/07, Tom Hughes <to...@co...> wrote: > > In message <e2e...@ma...> > you wrote: > > So it thinks it is launching a 64 bit tool... > > ...but the tool actually seems to be a 32 bit one. > > I think you will find that .in_place/amd64-linux/drd is a 32 bit > program - it should be a 64 bit one. > > There must be something wrong with your build scripts I think. > > Tom > You're right, drd/Makefile.am was wrong. I have fixed it, and now drd is started properly (but doesn't run yet). Thanks. Bart. |