eh-steve / goloader

Compile, load and run Go code at runtime.
Apache License 2.0
46 stars 4 forks source link

Darwin still uses CGo symbols (via trampolines) with CGO_ENABLED=0 #12

Closed eh-steve closed 1 year ago

eh-steve commented 1 year ago

Still need to register addresses of libc/x509 etc symbols on Darwin with CGO disabled since they're linked using the //go:cgo_import_dynamic pragma.

Maybe implement asm libdl trampolines or some other way of identifying them (macho relocs?)

eh-steve commented 1 year ago

Resolved in #5 (https://github.com/eh-steve/goloader/pull/5/commits/8e53b54530774ac4d40b8d8acb117695daad179b)