Is it possible to call a static object (.so) file from Go? I\'ve been searchign Google and I keep hitting upon the claim that I can do
lib, _ := syscall.Load
On a POSIX platform, you could use cgo to call dlopen and friends:
cgo
// #cgo LDFLAGS: -ldl // #include import "C" import fmt func foo() { handle := C.dlopen(C.CString("libfoo.so"), C.RTLD_LAZY) bar := C.dlsym(handle, C.CString("bar")) fmt.Printf("bar is at %p\n", bar) }