# strace teststat /var/ext
execve("/var/ext/bin/teststat", ["teststat", "/var/ext"], [/* 180 vars */]) = 0
svr4_syscall() = -1 ERRNO_4090 (Unknown error 4090)
stat("/etc/ld-uClibc.so.cache", 0x7fd04880) = -1 ENOENT (No such file or directory)
open("/lib/libtcl8.5.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/var/ext/lib/libtcl8.5.so", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0777, st_size=1270707, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\200\367\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 1146880, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aabe000
old_mmap(0x2aabe000, 1038316, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2aabe000
old_mmap(0x2abcb000, 40708, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xfd000) = 0x2abcb000
old_mmap(0x2abd5000, 3056, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2abd5000
close(3) = 0
munmap(0x2aaae000, 4096) = 0
open("/lib/libm.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0777, st_size=114004, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0@\22\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 176128, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2abd6000
old_mmap(0x2abd6000, 105588, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2abd6000
old_mmap(0x2ac00000, 500, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1a000) = 0x2ac00000
close(3) = 0
munmap(0x2aaae000, 4096) = 0
open("/lib/libpthread.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0777, st_size=96836, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0 4\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 151552, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ac01000
old_mmap(0x2ac01000, 53416, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2ac01000
old_mmap(0x2ac1e000, 22440, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xd000) = 0x2ac1e000
old_mmap(0x2ac24000, 6816, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ac24000
close(3) = 0
munmap(0x2aaae000, 4096) = 0
open("/lib/libdl.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0777, st_size=9436, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0000\10\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 77824, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ac26000
old_mmap(0x2ac26000, 6432, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2ac26000
old_mmap(0x2ac37000, 4272, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1000) = 0x2ac37000
close(3) = 0
munmap(0x2aaae000, 4096) = 0
open("/lib/libnsl.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0777, st_size=4896, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\220\3\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 73728, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ac39000
old_mmap(0x2ac39000, 964, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2ac39000
old_mmap(0x2ac4a000, 28, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1000) = 0x2ac4a000
close(3) = 0
munmap(0x2aaae000, 4096) = 0
open("/lib/libssl.so.0.9.8", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0555, st_size=202136, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\320j\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 253952, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ac4b000
old_mmap(0x2ac4b000, 179844, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2ac4b000
old_mmap(0x2ac86000, 10416, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x2b000) = 0x2ac86000
close(3) = 0
munmap(0x2aaae000, 4096) = 0
open("/lib/libcrypto.so.0.9.8", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0555, st_size=1027728, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\0^\2\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 1003520, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ac89000
old_mmap(0x2ac89000, 866092, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2ac89000
old_mmap(0x2ad6d000, 59564, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xd4000) = 0x2ad6d000
old_mmap(0x2ad7c000, 6528, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ad7c000
close(3) = 0
munmap(0x2aaae000, 4096) = 0
open("/lib/libgcc_s.so.1", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0555, st_size=214462, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\300\26\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 122880, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ad7e000
old_mmap(0x2ad7e000, 55156, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2ad7e000
old_mmap(0x2ad9b000, 3284, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xd000) = 0x2ad9b000
close(3) = 0
munmap(0x2aaae000, 4096) = 0
open("/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0777, st_size=615072, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0`\221\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 671744, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ad9c000
old_mmap(0x2ad9c000, 571940, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2ad9c000
old_mmap(0x2ae37000, 7596, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x8b000) = 0x2ae37000
old_mmap(0x2ae39000, 24784, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ae39000
close(3) = 0
munmap(0x2aaae000, 4096) = 0
open("/lib/libdl.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0777, st_size=9436, ...}) = 0
close(3) = 0
open("/lib/libpthread.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0777, st_size=96836, ...}) = 0
close(3) = 0
open("/lib/libm.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0777, st_size=114004, ...}) = 0
close(3) = 0
open("/lib/libgcc_s.so.1", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0555, st_size=214462, ...}) = 0
close(3) = 0
open("/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0777, st_size=615072, ...}) = 0
close(3) = 0
open("/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0777, st_size=615072, ...}) = 0
close(3) = 0
open("/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0777, st_size=615072, ...}) = 0
close(3) = 0
open("/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0777, st_size=615072, ...}) = 0
close(3) = 0
open("/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0777, st_size=615072, ...}) = 0
close(3) = 0
open("/lib/libcrypto.so.0.9.8", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0555, st_size=1027728, ...}) = 0
close(3) = 0
open("/lib/libdl.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0777, st_size=9436, ...}) = 0
close(3) = 0
open("/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0777, st_size=615072, ...}) = 0
close(3) = 0
open("/lib/libdl.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0777, st_size=9436, ...}) = 0
close(3) = 0
open("/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0777, st_size=615072, ...}) = 0
close(3) = 0
open("/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0777, st_size=615072, ...}) = 0
close(3) = 0
stat("/lib/ld-uClibc.so.0", {st_mode=S_IFREG|0777, st_size=22628, ...}) = 0
mprotect(0x2ac1e000, 4096, PROT_READ) = 0
mprotect(0x2ac37000, 4096, PROT_READ) = 0
mprotect(0x2ae37000, 4096, PROT_READ) = 0
mprotect(0x2aabc000, 4096, PROT_READ) = 0
ioctl(0, TIOCNXCL, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TIOCNXCL, {B38400 opost isig icanon echo ...}) = 0
getpid() = 2062
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=717352936}) = 0
setrlimit(RLIMIT_STACK, {rlim_cur=2040*1024, rlim_max=717352936}) = 0
rt_sigaction(SIGRT_0, {SIG_DFL}, NULL, 16) = 0
rt_sigaction(SIGRT_1, {SIG_DFL}, NULL, 16) = 0
rt_sigaction(SIGRT_2, {SIG_DFL}, NULL, 16) = 0
rt_sigprocmask(SIG_BLOCK, [RT_0], NULL, 16) = 0
rt_sigprocmask(SIG_UNBLOCK, [RT_1], NULL, 16) = 0
brk(0) = 0x484000
brk(0x485000) = 0x485000
stat("/var/ext", {st_mode=S_IFDIR|0777, st_size=16384, ...}) = 0
write(1, "stat(/var/ext) return=0 stat.st_"..., 39stat(/var/ext) return=0 stat.st_mode=e
) = 39
exit(0) = ?
#