dlopen

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package dlopen provides some convenience functions to dlopen a library and get its symbols.

Index

Constants

This section is empty.

Variables

View Source
var ErrSoNotFound = errors.New("unable to open a handle to the library")

Functions

This section is empty.

Types

type LibHandle

type LibHandle struct {
	Handle  syscall.Handle
	LibName string
}

LibHandle represents an open handle to a library (.so)

func GetHandle

func GetHandle(libs []string) (*LibHandle, error)

func (*LibHandle) Close

func (l *LibHandle) Close() error

Close closes a LibHandle.

func (*LibHandle) GetSymbolPointer

func (l *LibHandle) GetSymbolPointer(symbol string) (unsafe.Pointer, error)

GetSymbolPointer takes a symbol name and returns a pointer to the symbol.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL