diff --git a/dl.go b/dl.go index 807981f..9cc4f90 100644 --- a/dl.go +++ b/dl.go @@ -139,8 +139,8 @@ func cast(sym unsafe.Pointer, v interface{}) error { return nil } -// loadsym wraps loading symbol name from the handle, decoding the value to v. -func loadsym(h unsafe.Pointer, name string, v interface{}) error { +// Sym wraps loading symbol name from handle h, decoding the value to v. +func Sym(h unsafe.Pointer, name string, v interface{}) error { n := C.CString(name) defer C.free(unsafe.Pointer(n)) @@ -154,10 +154,10 @@ func loadsym(h unsafe.Pointer, name string, v interface{}) error { // SymDefault loads symbol name into v from the RTLD_DEFAULT handle. func SymDefault(name string, v interface{}) error { - return loadsym(C.RTLD_DEFAULT, name, v) + return Sym(C.RTLD_DEFAULT, name, v) } // SymNext loads symbol name into v from the RTLD_NEXT handle. func SymNext(name string, v interface{}) error { - return loadsym(C.RTLD_NEXT, name, v) + return Sym(C.RTLD_NEXT, name, v) } diff --git a/lib.go b/lib.go index ba68a02..7bc8518 100644 --- a/lib.go +++ b/lib.go @@ -67,5 +67,5 @@ func (l *Lib) Close() error { // Sym loads symbol name from the loaded library into v. func (l *Lib) Sym(name string, v interface{}) error { - return loadsym(l.h, name, v) + return Sym(l.h, name, v) }