In linux userland applications, the following error (and similar ones for Syscall6 and RawSyscall)occurred, when building applications that use the unix.Syscall package:
ld.lld: error: undefined symbol: golang.org/x/sys/unix.Syscall
>>> referenced by zsyscall_linux.go:1490 (.../golang.org/x/sys/unix/zsyscall_linux.go:1490)
error: failed to link /tmp/tinygo3353455449/main: exit status 1
This patch adds the functionality to use tinygo's syscalls for any linux userland application for the architectures that tinygo supports.
P.S: For me this was the easiest solution, although this might not be super clean. I would be happy to discuss with anyone interested in the tinygo compiler development if we can improve this in any way, but for now it seems to do the job.
Also I'm not quite sure how to test this in a good way, maybe someone has any good ideas on that as well.
In linux userland applications, the following error (and similar ones for Syscall6 and RawSyscall)occurred, when building applications that use the
unix.Syscall
package:This patch adds the functionality to use tinygo's syscalls for any linux userland application for the architectures that tinygo supports.
P.S: For me this was the easiest solution, although this might not be super clean. I would be happy to discuss with anyone interested in the tinygo compiler development if we can improve this in any way, but for now it seems to do the job. Also I'm not quite sure how to test this in a good way, maybe someone has any good ideas on that as well.