Commits

Anonymous committed e897132

Add some docs and make Ldd assume '/', the common case.

Comments (0)

Files changed (2)

 
 	for _, tt := range lddTests {
 		var _ os.Error
-		res, _ := Ldd(tt.file, tt.root, tt.libs)
+		res, _ := Lddroot(tt.file, tt.root, tt.libs)
 		fmt.Printf("Test: '%v' '%v' '%v' '%v' = '%v'\n", tt.file, tt.root, tt.libs, tt.err, res)
 		/*
 		if err != nil {
 	"strings"
 )
 
-func Ldd(cmd, root, liblist string) ([]string, os.Error) {
+// Lddroot returns a []string containing all the files (including 
+// symbolic links) that the binary depends on. It is like 
+// the SunOS/Solaris/Linux ldd command. The root parameter is used
+// on systems which contain a full root file system (e.g. ARM file
+// system on OSX). 
+func Lddroot(cmd, root, liblist string) ([]string, os.Error) {
 	/* it might just be static ... */
 	ret := []string{}
 	libpath := strings.Split(liblist, ":")
 	return ret, nil
 }
 
+// Ldd returns a []string containing all the files (including 
+// symbolic links) that the binary depends on. It is like 
+// the SunOS/Solaris/Linux ldd command. 
+func Ldd(cmd, liblist string) ([]string, os.Error) {
+	return Lddroot(cmd, "/", liblist)
+}