Hi All,
I hope everyone's well! I'm new to the list so thought I should say hi
first :-) Hello!
There's been a fair bit of discussion about Valgrind on ARM that I
found via Google - I've got to a point where we have a configure
recipe that creates a Valgrind that can build and run but when I run
it it fails to recognise opcodes.
Our environment :
ARM11767JZ-S CPU on target board
Linux 2.6.31.12-rt21 Kernel adapted to our hardware
CodeSourcery G++ Lite 2009q1-203 toolchain (based on GCC 4.3.3 /
binutils 2.19.51.20090205)
I've built valgrind using the following configure command :
CC=arm-none-linux-gnueabi-gcc \
CFLAGS="-pipe -Os -mabi=aapcs-linux -msoft-float -mtune=arm1176jz-s" \
./configure \
--build=i686-linux --target=arm-none-linux-gnueabi
--host=armv7-none-linux-gnueabi \
--prefix=/mnt/mainfs/target_tools/valgrind
This seems to produce a configuration that we can build and start to
run. Once built if I run it on the target against hello world I get :
# ../valgrind/bin/valgrind -v ./hello
==3974== Memcheck, a memory error detector
==3974== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==3974== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
==3974== Command: ./hello
==3974==
--3974-- Valgrind options:
--3974-- -v
--3974-- Contents of /proc/version:
--3974-- Linux version 2.6.31.12-rt21-femtobsr-alu
([email protected]) (gcc version 4.3.3
(Sourcery G++ Lite 2009q1-203) ) ALU HomeBSR
--3974-- Arch and hwcaps: ARM, ARMv6
--3974-- Page sizes: currently 4096, max supported 4096
--3974-- Valgrind library directory:
/mnt/mainfs/target_tools/valgrind/lib/valgrind
--3974-- Reading syms from /mnt/mainfs/target_tools/bin/hello (0x8000)
--3974-- Reading syms from /lib/ld-2.8.so (0x4000000)
--3974-- Reading suppressions file:
/mnt/mainfs/target_tools/valgrind/lib/valgrind/default.supp
==3974==
==3974== Process terminating with default action of signal 4 (SIGILL)
==3974== Illegal opcode at address 0x380A481C
==3974== at 0x40007B0: ??? (in /lib/ld-2.8.so)
==3974==
==3974== HEAP SUMMARY:
==3974== in use at exit: 0 bytes in 0 blocks
==3974== total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==3974==
==3974== All heap blocks were freed -- no leaks are possible
==3974==
==3974== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
==3974== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Illegal instruction
So, my questions are :
- I'm sure other ARM users have success, can you comment on your
configuration options and targets / kernel conf?
- Does that look like an expected illegal opcode?! I'm slightly
surprised as it's in ld.so which I'd not anticipate would have
anything tricky in especially being a 2009 variant...
- I notice that Valgrind decides we're a v6 CPU - can anyone tell me
how that's discerned? Is that because the default kernel config I've
built with set CONFIG_CPU_V6? (I'm marginally concerned at the
prospect of porting up to use CPU_V7!)
Thanks for any suggestions!
~Pev
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in
Real-Time with Splunk. Collect, index and harness all the fast moving IT data
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business
insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users