Golang 程序动态链接的几个尝试,求助
execve("./hello", ["./hello"], 0xbeb9ade0 /* 13 vars */) = 0
set_tls(0xb6fd1590) = 0
set_tid_address(0xb6fd1534) = 19586
open("/etc/ld-musl-armhf.path", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libucontext.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=4147, ...}) = 0
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\30\4\0\0004\0\0\0"..., 936) = 936
mmap2(NULL, 73728, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xb6f49000
mmap2(0xb6f59000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xb6f59000
close(3) = 0
open("/lib/libgo.so.13", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
fstat64(3, {st_mode=S_IFREG|0755, st_size=14516773, ...}) = 0
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0P\34V\0004\0\0\0"..., 936) = 936
mmap2(NULL, 14696448, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xb6145000
mmap2(0xb6c82000, 2912256, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xb2d000) = 0xb6c82000
mmap2(0xb6f2e000, 110592, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb6f2e000
close(3) = 0
open("/lib/libgcc_s.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=41251, ...}) = 0
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0000E\0\0004\0\0\0"..., 936) = 936
mmap2(NULL, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xb612a000
mmap2(0xb6143000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x9000) = 0xb6143000
close(3) = 0
mprotect(0xb6f59000, 4096, PROT_READ) = 0
mprotect(0xb6c82000, 1699840, PROT_READ) = 0
mprotect(0xb6143000, 4096, PROT_READ) = 0
mprotect(0x21000, 4096, PROT_READ) = 0
sched_getaffinity(0, 128, [0, 1]) = 4
brk(NULL) = 0x1427000
write(2, "fatal error: ", 13fatal error: ) = 13
write(2, "runtime: cannot reserve arena vi"..., 51runtime: cannot reserve arena virtual address space) = 51
write(2, "\n", 1
) = 1
write(2, "runtime: panic before malloc hea"..., 46runtime: panic before malloc heap initialized
) = 46
_newselect(0, NULL, NULL, NULL, {tv_sec=0, tv_usec=1000}) = 0 (Timeout)
_newselect(0, NULL, NULL, NULL, {tv_sec=0, tv_usec=1000}) = 0 (Timeout)
write(2, "\nruntime stack:\n", 16
runtime stack:
) = 16
stat64(NULL, 0xbe8b4200) = -1 EFAULT (Bad address)
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6fce000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6fcd000
open("/proc/self/exe", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb6fcc000
munmap(0xb6fcc000, 4096) = 0
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0x2000) = 0xb6fcc000
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0x2000) = 0xb6fcb000
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb6fca000
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb6fc9000
munmap(0xb6fca000, 4096) = 0
munmap(0xb6fcc000, 4096) = 0
munmap(0xb6fcb000, 4096) = 0
close(3) = 0
open("./hello", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb6fcc000
munmap(0xb6fcc000, 4096) = 0
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0x2000) = 0xb6fcc000
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0x2000) = 0xb6fcb000
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb6fca000
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb6fc8000
munmap(0xb6fca000, 4096) = 0
munmap(0xb6fcc000, 4096) = 0
munmap(0xb6fcb000, 4096) = 0
close(3) = 0
open("/lib/libucontext.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb6fcc000
munmap(0xb6fcc000, 4096) = 0
mmap2(NULL, 0, PROT_READ, MAP_PRIVATE, 3, 0) = -1 EINVAL (Invalid argument)
write(2, "mmap", 4mmap) = 4
write(2, " errno ", 7 errno ) = 7
write(2, "22", 222) = 2
write(2, "\n", 1
) = 1
write(2, "fatal error: ", 13fatal error: ) = 13
write(2, "mmap", 4mmap) = 4
write(2, "\n", 1
) = 1
write(2, "runtime: panic before malloc hea"..., 46runtime: panic before malloc heap initialized
) = 46
write(2, "panic during panic\n", 19panic during panic
) = 19
write(2, "\nruntime stack:\n", 16
runtime stack:
) = 16
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6fcc000
open("/proc/self/exe", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 4
fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb6fcb000
munmap(0xb6fcb000, 4096) = 0
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 4, 0x2000) = 0xb6fcb000
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 4, 0x2000) = 0xb6fca000
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb6fc7000
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb6fc6000
munmap(0xb6fc7000, 4096) = 0
munmap(0xb6fcb000, 4096) = 0
munmap(0xb6fca000, 4096) = 0
close(4) = 0
open("./hello", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 4
fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb6fcb000
munmap(0xb6fcb000, 4096) = 0
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 4, 0x2000) = 0xb6fcb000
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 4, 0x2000) = 0xb6fca000
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb6fc7000
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb6fc5000
munmap(0xb6fc7000, 4096) = 0
munmap(0xb6fcb000, 4096) = 0
munmap(0xb6fca000, 4096) = 0
close(4) = 0
open("/lib/libucontext.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 4
fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb6fcb000
munmap(0xb6fcb000, 4096) = 0
mmap2(NULL, 0, PROT_READ, MAP_PRIVATE, 4, 0) = -1 EINVAL (Invalid argument)
write(2, "mmap", 4mmap) = 4
write(2, " errno ", 7 errno ) = 7
write(2, "22", 222) = 2
write(2, "\n", 1
) = 1
write(2, "fatal error: ", 13fatal error: ) = 13
write(2, "mmap", 4mmap) = 4
write(2, "\n", 1
) = 1
write(2, "runtime: panic before malloc hea"..., 46runtime: panic before malloc heap initialized
) = 46
write(2, "stack trace unavailable\n", 24stack trace unavailable
) = 24
exit_group(4) = ?
+++ exited with 4 +++