github.com/ebitengine/purego@v0.8.0-alpha.2.0.20240512170805-6cd12240d332/internal/load/load_unix.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // SPDX-FileCopyrightText: 2024 The Ebitengine Authors 3 4 //go:build darwin || freebsd || linux 5 6 package load 7 8 import "github.com/ebitengine/purego" 9 10 func OpenLibrary(name string) (uintptr, error) { 11 return purego.Dlopen(name, purego.RTLD_NOW|purego.RTLD_GLOBAL) 12 } 13 14 func OpenSymbol(lib uintptr, name string) (uintptr, error) { 15 return purego.Dlsym(lib, name) 16 }