pub fn get_library_dependencies(binary_path: &Path) -> Result<Vec<String>>Expand description
Extract library dependencies from an ELF binary using readelf.
This is architecture-independent - readelf reads the ELF headers directly without executing the binary, unlike ldd which uses the host dynamic linker.
§Errors
Returns an error if:
- The file does not exist
readelfis not installed (install binutils)readelffails for reasons other than “not an ELF file”
Returns Ok(Vec::new()) if the file is not an ELF binary (e.g., a text file).