Source file src/runtime/cgo/library_aix.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 && aix 6 7 package cgo 8 9 // dlopen flags from <dlfcn.h>. RTLD_MEMBER lets dlopen open archive 10 // members such as "libc.a(shr_64.o)", the usual form of AIX shared 11 // libraries. 12 const ( 13 _RTLD_NOW = 0x2 14 _RTLD_LOCAL = 0x80000 15 _RTLD_MEMBER = 0x40000 16 17 dlopenFlags = _RTLD_NOW | _RTLD_LOCAL | _RTLD_MEMBER 18 ) 19 20 // Open is the only user of dlopen, dlsym, and dlerror, so import them only 21 // when the cgobindings experiment is enabled. 22 23 //go:cgo_import_dynamic _cgo_libc_dlopen dlopen "libc.a/shr_64.o" 24 //go:cgo_import_dynamic _cgo_libc_dlsym dlsym "libc.a/shr_64.o" 25 //go:cgo_import_dynamic _cgo_libc_dlerror dlerror "libc.a/shr_64.o" 26