[go-nuts] Re: Dlopen without Cgo on Darwin (#18296)

2019-12-13 Thread 'Ivan Trubach' via golang-nuts
I plan to finish FFI (the Call/Invoke method) and add dladdr(3) for the sake of completeness, and then the usual README/LICENSE stuff. Still not sure what to do about the C to Go callbacks. Though it seems doable now (runtime.cgocallback). -- You received this message because you are subscribe

Re: [go-nuts] Dlopen without Cgo on Darwin (#18296)

2019-12-13 Thread 'Ivan Trubach' via golang-nuts
Sure, I will. The dyld package should work for dlsym C calls, however I don’t think it’s possible to do callbacks with the functionality runtime exposes (i.e. I am talking about API that sys/windows package provides). So, yeah, while there is no need for Darwin dlopen in x/sys/unix, we still nee

[go-nuts] Dlopen without Cgo on Darwin (#18296)

2019-12-12 Thread 'Ivan Trubach' via golang-nuts
Hi, I’ve stubbled upon issue 18296 (dlopen/dlsym without CGo). The discussion focuses on Linux, but since Go on Darwin already co-exists with libSystem, wouldn’t it be trivial to add Darwin dlopen support to e.g. x/sys/unix? I’ve also set up a small standalone dlopen demo: https://github.com/tie