|
From: Joachim B. <joa...@gm...> - 2006-05-30 12:38:21
|
Hi everybody,
maybe this is a stupid question but I'm taking the risk :-)
We are trying to crosscompile valgrind 3.1.1 with a mvl (monta vista linux)
pentium 3 cross compiler
./configure --prefix=/opt/valgrind
CC=/utran/ngrncPFmvl/cge/devkit/x86/pentium3/bin/pentium3-gcc --target=i386
--host=i686-intel-linux --disable-tls ; make ; make install
the above does the trick but what confuses me is that valgrind is not
static:
demx54k3_VG] ixcs19[demx54k3][261]~/valgrind-3.1.1 >ldd
/opt/valgrind/bin/valgrind
libc.so.6 =>
/utran/ngrncPFmvl/cge/devkit/x86/pentium3/target/lib/libc.so.6 (0xdead1000)
/lib/ld-linux.so.2 =>
/utran/ngrncPFmvl/cge/devkit/x86/pentium3/target/lib/ld-linux.so.2(0xdead2000)
the NEWS file for 3.1.0 has the info that:
- Most users should not notice, but as part of the address space
manager change, the way Valgrind is built has been changed. Each
tool is now built as a statically linked stand-alone executable,
rather than as a shared object that is dynamically linked with the
core. ...
Can someone please let me know what I am missing?
Thanks,
joachim
--
http://www.bauernberger.de/
OpenBC: https://www.openbc.com/hp/Joachim_Bauernberger/
mailto:jo...@ba...
ICQ: 214527045
Tel/Fax: +(49)-0-89/1588 3874
HP: +(49)-0-179/674 3611
|
|
From: Julian S. <js...@ac...> - 2006-05-30 12:49:12
|
> the above does the trick but what confuses me is that valgrind is not > static: $prefix/bin/valgrind is a small wrapper which starts the real Valgrind executables. These are $prefix/lib/valgrind/x86-linux/none et al, and it is those that are statically linked. J |
|
From: Dennis L. <pla...@pr...> - 2006-05-30 12:57:50
|
Am Dienstag, den 30.05.2006, 14:37 +0200 schrieb Joachim Bauernberger: > the NEWS file for 3.1.0 has the info that: > > - Most users should not notice, but as part of the address space > manager change, the way Valgrind is built has been changed. Each > tool is now built as a statically linked stand-alone executable, > rather than as a shared object that is dynamically linked with the > core. ... > > > > Can someone please let me know what I am missing? Its the tools that are statically linked. E.g. /usr/lib/valgrind/x86-linux/memcheck greets Dennis |
|
From: Joachim B. <joa...@gm...> - 2006-05-30 14:59:38
|
thanks for the clarification Julian!
I have now tried to run the cross compiled valgrind on the target, but it
immediately segfaults on memcheck:
here is the strace/gdb output:
[....]
stat64("/opt/SMAW/SMAWrtp/lib", {st_mode=S_IFDIR|0777, st_size=8192, ...}) =
0
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=26444, ...}) = 0
mmap2(NULL, 26444, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2aac2000
close(3) = 0
open("/lib/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 Z\1\000"..., 1024)
= 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=18965114, ...}) = 0
mmap2(NULL, 1302052, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x2aac9000
mprotect(0x2ac00000, 28196, PROT_NONE) = 0
mmap2(0x2ac00000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0x136) = 0x2ac00000
mmap2(0x2ac05000, 7716, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ac05000
close(3) = 0
munmap(0x2aac2000, 26444) = 0
brk(0) = 0x804c564
brk(0x804d564) = 0x804d564
brk(0x804e000) = 0x804e000
readlink("/proc/self/exe", "/user/demx1779/local/target_p3/bin/valgrind",
4096) = 43
execve("/user/demx1779/local/target_p3/lib/valgrind/x86-linux/memcheck",
["/user/demx1779/local/target_p3/b"...], [/* 30 vars */]) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV ++
gdb says that:
root@sb1-13:/opt# gdb /opt/valgrind/lib/valgrind/x86-linux/memcheck
GNU gdb 6.0 (MontaVista 6.0-11.0.11.0500051 2005-01-15)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-hardhat-linux"...
(gdb) run /opt/valgrind/bin/valgrind
Starting program: /opt/valgrind/lib/valgrind/x86-linux/memcheck
/opt/valgrind/bin/valgrind
Program received signal SIGSEGV, Segmentation fault.
0xb001a5a7 in _start () at m_main.c:2754
2754 m_main.c: No such file or directory.
in m_main.c
(gdb) bt
#0 0xb001a5a7 in _start () at m_main.c:2754
(gdb)
any ideas?
thanks,
joachim
On 5/30/06, Julian Seward < js...@ac...> wrote:
>
>
> > the above does the trick but what confuses me is that valgrind is not
> > static:
>
> $prefix/bin/valgrind is a small wrapper which starts the real
> Valgrind executables. These are $prefix/lib/valgrind/x86-linux/none
> et al, and it is those that are statically linked.
>
> J
>
>
> -------------------------------------------------------
> All the advantages of Linux Managed Hosting--Without the Cost and Risk!
> Fully trained technicians. The highest number of Red Hat certifications in
> the hosting industry. Fanatical Support. Click to learn more
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
> _______________________________________________
> Valgrind-users mailing list
> Val...@li...
> https://lists.sourceforge.net/lists/listinfo/valgrind-users
>
--
http://www.bauernberger.de/
OpenBC: https://www.openbc.com/hp/Joachim_Bauernberger/
mailto:jo...@ba...
ICQ: 214527045
Tel/Fax: +(49)-0-89/1588 3874
HP: +(49)-0-179/674 3611
|