github.com/notti/nocgo@v0.0.0-20190619201224-fc443047424c/internal/dlopen/dlopen_freebsd.go (about) 1 // +build !cgo 2 3 package dlopen 4 5 // we have to use the 3 argument format here :( - 2 argument format is only allowed from inside cgo 6 7 //go:cgo_import_dynamic libc_dlopen_x dlopen "libc.so.7" 8 //go:cgo_import_dynamic libc_dlclose_x dlclose "libc.so.7" 9 //go:cgo_import_dynamic libc_dlsym_x dlsym "libc.so.7" 10 //go:cgo_import_dynamic libc_dlerror_x dlerror "libc.so.7" 11 12 // on amd64 we don't need the following line - on 386 we do... 13 // anyway - with those lines the output is better (but doesn't matter) - without it on amd64 we get multiple DT_NEEDED with "libc.so.6" etc 14 15 //go:cgo_import_dynamic _ _ "libc.so.7"