github.com/ratrocket/u-root@v0.0.0-20180201221235-1cf9f48ee2cf/pkg/ldd/ldso_linux.go (about) 1 package ldd 2 3 import ( 4 "fmt" 5 "path/filepath" 6 ) 7 8 const ldso = "/lib*/ld-linux-*.so.*" 9 10 func LdSo() (string, error) { 11 n, err := filepath.Glob(ldso) 12 if err != nil { 13 return "", err 14 } 15 if len(n) == 0 { 16 return "", fmt.Errorf("No ld.so matches %v", ldso) 17 } 18 return n[0], nil 19 }