Skip to content

Commit 28cd343

Browse files
tiranclaude
andcommitted
cli: human-readable YAML-like output with --symbols flag
Replace pprint with a YAML-like formatter for ELFInfo output. Add --symbols flag to include sorted exported and imported dynamic symbols. None-valued fields and the marker field are omitted. Multiple entries are separated by "---". Example: ``` $ elfdeps /usr/lib64/libc.so.6 filename: /usr/lib64/libc.so.6 requires: - ld-linux-x86-64.so.2(GLIBC_2.3)(64bit) provides: - libc.so.6(GLIBC_2.34)(64bit) machine: EM_X86_64 is_dso: true is_exec: false soname: libc.so.6 ``` Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 342437a commit 28cd343

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,34 @@ libc.so.6(GLIBC_PRIVATE)(64bit)
2929
libc.so.6()(64bit)
3030
```
3131

32+
`elfdeps` can also inspect archives like Python wheels and extract symbols:
33+
34+
```shell-session
35+
$ elfdeps --symbols torchaudio-2.11.0-cp312-cp312-manylinux_2_28_x86_64.whl
36+
filename: torchaudio/lib/_torchaudio.abi3.so
37+
requires:
38+
- libgcc_s.so.1(GCC_3.0)(64bit)
39+
- libc.so.6(GLIBC_2.2.5)(64bit)
40+
- ...
41+
provides: []
42+
machine: EM_X86_64
43+
is_dso: true
44+
is_exec: true
45+
got_debug: false
46+
got_hash: false
47+
got_gnuhash: true
48+
soname: _torchaudio.abi3.so
49+
exported_symbols:
50+
- _ZN10torchaudio12cuda_versionEv
51+
- _ZN10torchaudio18is_align_availableEv
52+
- ...
53+
imported_symbols:
54+
- ...
55+
- aoti_torch_abi_version
56+
- aoti_torch_delete_library_object
57+
- ...
58+
```
59+
3260
## RPM
3361

3462
In Fedora-based distributions, RPM packages provide and require virtual packages with ELF sonames and versions. The package manager can install virtual provides.

0 commit comments

Comments
 (0)