Собираю Valgrind для linux-uclibcgnueabi на железке sam9m10g45-ek
CC=arm-linux-uclibcgnueabi-gcc CFLAGS=-pipe -Os -mtune=arm9tdmi -mabi=aapcs-linux -msoft-float -I/opt/toolchains/arm926t-uclibcgnueabi/usr/include LDFLAGS=-L/opt/toolchains/arm926t-uclibcgnueabi/usr/lib ../valgrind-3.8.1/configure --prefix=/home/splinter/ARMBUILD/valgrind --host=armv7-unknown-linux --target=armv7-unknown-linux --build=i486-slackware-linux
make && make install Посмотрел через ldd бинарнику valgrind нужен только
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x4000e000)
libc.so.0 => /lib/libc.so.0 (0x40021000)
ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x40000000)
[root@cpu-unit ~]# /usr/bin/valgrind
Illegal instruction
через strace:
execve("/usr/bin/valgrind", ["/usr/bin/valgrind"], [/* 18 vars */]) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40005000
stat("/etc/ld.so.cache", {st_mode=S_IFREG|0644, st_size=2866, ...}) = 0
open("/etc/ld.so.cache", O_RDONLY) = 3
mmap2(NULL, 2866, PROT_READ, MAP_SHARED, 3, 0) = 0x40006000
close(3) = 0
open("/lib/libgcc_s.so.1", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=43172, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40007000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0p'\0\0004\0\0\0\274"..., 4096) = 4096
mmap2(NULL, 77824, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4000e000
mmap2(0x4000e000, 41384, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x4000e000
mmap2(0x40020000, 964, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xa) = 0x40020000
close(3) = 0
munmap(0x40007000, 4096) = 0
open("/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=527131, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40007000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0p\243\0\0004\0\0\0\324"..., 4096) = 4096
mmap2(NULL, 581632, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40021000
mmap2(0x40021000, 523492, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x40021000
mmap2(0x400a8000, 5000, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x7f) = 0x400a8000
mmap2(0x400aa000, 16924, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x400aa000
close(3) = 0
munmap(0x40007000, 4096) = 0
open("/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=527131, ...}) = 0
close(3) = 0
munmap(0x40006000, 2866) = 0
stat("/lib/ld-uClibc.so.0", {st_mode=S_IFREG|0755, st_size=21200, ...}) = 0
mprotect(0x400a8000, 4096, PROT_READ) = 0
mprotect(0x4000c000, 4096, PROT_READ) = 0
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
--- SIGILL (Illegal instruction) @ 0 (0) ---
+++ killed by SIGILL +++
Где я ошибся?