When running strace on a 64 bit userland program on
sparc64, it fails.
Here is what happens...
blade:~/64-bit# file
helloworld64
helloworld64: ELF 64-bit MSB executable, SPARC V9,
version 1, dynamically linked
blade:~/64-bit# strace
./helloworld64
execve("./helloworld64", ["./helloworld64"], [/* 18
vars */]) = 0
in a 32 bit compiled version, it works:
blade:~/64-bit# file
helloworld32
helloworld32: ELF 32-bit MSB executable, SPARC, version
1, dynamically linked
blade:~/64-bit# strace
./helloworld32
execve("./helloworld32", ["./helloworld32"], [/* 18
vars */]) = 0 uname({sys="Linux",
node="blade", ...}) =
0
brk(0) =
0x207a0 mmap(NULL, 8192,
PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x700open("/etc/ld.so.preload", O_RDONLY) = -1
ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) =
3 fstat64(3,
{st_mode=S_IFREG|0644, st_size=42147, ...}) =
0 mmap(NULL, 42147, PROT_READ,
MAP_PRIVATE, 3, 0) = 0x7001c000
close(3) =
0
open("/lib/libc.so.6", O_RDONLY) =
3 read(3,
"\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\2\0\0\0\1\0\0028"...,
1024) = 104fstat64(3, {st_mode=S_IFREG|0755,
st_size=1254604, ...}) = 0
mmap(NULL, 1330376, PROT_READ|PROT_EXEC, MAP_PRIVATE,
3, 0) = 0x7002a000 mprotect(0x70154000, 109768,
PROT_NONE) = 0
mmap(0x7015a000, 73728, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED, 0mmap(0x7016c000, 11464,
PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|M0close(3)
= 0
munmap(0x7001c000, 42147) =
0 fstat64(1,
{st_mode=S_IFCHR|0600, st_rdev=makedev(4, 64), ...}) =
0 ioctl(1, 0x40245408, {B9600 opost isig
icanon echo ...}) = 0 mmap(NULL,
8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x700write(1, "hello 64bit world\n", 18hello
64bit world ) =
18
munmap(0x7001c000, 8192) =
0
exit(1) =
?
the file compiled is a simple hello world:
blade:~/64-bit# more main.c
int
main()
{
printf("hello 64bit world\n");
}
sparc64 support was edded in strace 4.5.6.