I am still a beginner in Linux internals so please bear with me.

I have a ".so" that export "helloworld" function.

I load the ".so" using CGO by:

   1. Creating a file descriptor
   2. using ```write``` to write the so to it
   3. Get a handle using ```dlopen```
   4. Get the address of ```helloworld``` symbol using ```dlsym```

The address of "helloworld" is saved in a go variable called ```address```

How to call ```address``` ?

On windows I am able to call address using ```syscall.SyscallN```. On Linux 
I tried with 
```
r1, r2, err := syscall.Syscall(address, 0, 0, 0)
```

And I get "function not implemented" error.

Is ```syscall.Syscall``` on linux only reserved for real syscalls unlike 
for windows ? How to workaround this to execute my function (given that 
later it will have arguments and return value) ?

Thanks for any help or idea on this issue :)

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/golang-nuts/54d357d4-5f1e-4169-b2ab-c90297a7c50cn%40googlegroups.com.

Reply via email to