Documentation
¶
Overview ¶
Package ldd returns library dependencies of an executable.
The way this is done on GNU-based systems is interesting. For each ELF, one finds the .interp section. If there is no interpreter there's not much to do.
If there is an interpreter, we run it with the --list option and the file as an argument. We need to parse the output. For all lines with => as the 2nd field, we take the 3rd field as a dependency.
On many Unix kernels, the kernel ABI is stable. On OSX, the stability is held in the library interface; the kernel ABI is explicitly not stable. The ldd package on OSX will only return the files passed to it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FList ¶
FList returns a list of all library dependencies for a set of files, including following symlinks.
If a file has no dependencies, that is not an error. The only possible error is if a file does not exist, or it says it has an interpreter but we can't read it, or we are not able to run its interpreter.
It's not an error for a file to not be an ELF.
func GetInterp ¶
GetInterp returns the interpreter file path for the given ELF.
It is not an error for file not to be an ELF.
func List ¶
List returns a list of all library dependencies for a set of files.
If a file has no dependencies, that is not an error. The only possible error is if a file does not exist, or it says it has an interpreter but we can't read it, or we are not able to run its interpreter.
It's not an error for a file to not be an ELF.
Types ¶
This section is empty.