This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: crosstool - ARM922T - NMS9200


Trilok Soni wrote:
test # strace ./hello.shared
execve("./hello.shared", ["./hello.shared"], [/* 5
vars */]) = 0
uname({sys="Linux", node="(none)", ...}) = 0
brk(0)                                  = 0x1060c
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT
(No such file or directory)
--- SIGILL (Illegal instruction) @ 0 (0) ---
+++ killed by SIGIL

---
Why it is opening ld.so.preload?

See 'man ld.so'. It's ok for that file not to be there normally.


> [Same trace, but with 'libc.so' in ld.so.preload]
/test # strace ./hello.shared
execve("./hello.shared", ["./hello.shared"], [/* 5 vars */]) = 0
uname({sys="Linux", node="(none)", ...}) = 0
brk(0)                                  = 0x10550
open("/etc/ld.so.preload", O_RDONLY)    = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=10, ...}) = 0
old_mmap(NULL, 10, PROT_READ|PROT_WRITE, MAP_PRIVATE, 3, 0) = 0x40013000
close(3)                                = 0
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=802, ...}) = 0
old_mmap(NULL, 802, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40014000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1a\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0008\241\1"...,
1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=1254738, ...}) = 0
old_mmap(NULL, 1103544, PROT_READ|PROT_EXEC,
MAP_PRIVATE, 3, 0) = 0x4001c000
mprotect(0x40119000, 67256, PROT_NONE)  = 0
old_mmap(0x4011c000, 40960, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED, 3, 0xf8
000) = 0x4011c000
old_mmap(0x40126000, 14008, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANON
YMOUS, -1, 0) = 0x40126000
close(3)                                = 0
munmap(0x40013000, 10)                  = 0
--- SIGILL (Illegal instruction) @ 0 (0) ---
+++ killed by SIGILL +++

It does look like putting something in ld.so.preload helped, but I can't figure out why. BTW, that trace looks very much like a normal trace (as you can tell on your build system); when I do it, the final munmap is followed by

fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4017000
write(1, "hello, world\n", 13)          = 13

It sounds like maybe the app is crashing on startup.  You might need
to create a statically linked gdb or gdbserver to dig into this further,
and possibly compile glibc for debugging.

It is quite likely that crosstool doesn't have some option or patch you
need to get things to work on this platform.  If you find it, let me know :-)
- Dan

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]