Source file src/runtime/cgo/library_solaris.go
1 // Copyright 2026 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 //go:build goexperiment.cgobindings && !msan && !tsan && solaris 6 7 package cgo 8 9 // dlopen flags from <dlfcn.h>. This file is also used on illumos. 10 const ( 11 _RTLD_NOW = 0x2 12 _RTLD_LOCAL = 0x0 13 14 dlopenFlags = _RTLD_NOW | _RTLD_LOCAL 15 ) 16 17 // Open is the only user of dlopen, dlsym, and dlerror, so import them only 18 // when the cgobindings experiment is enabled. 19 20 //go:cgo_import_dynamic _cgo_libc_dlopen dlopen "libc.so" 21 //go:cgo_import_dynamic _cgo_libc_dlsym dlsym "libc.so" 22 //go:cgo_import_dynamic _cgo_libc_dlerror dlerror "libc.so" 23