elf: extract defined symbol versions
Metadata
Current evaluation
Merged into master. Adds defined symbol version extraction to the ElfFile class, enabling Snapcraft to detect missing or duplicate libraries. Approved by two reviewers, passed CI, and modified three files.
Suggested action: —
No scores available.
Issue body
- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] Have you successfully run `./runtests.sh static`?
- [x] Have you successfully run `./runtests.sh tests/unit`?
-----
I think it would be useful for Snapcraft to warn if a snap was missing libraries, or including duplicate libraries provided by the base snap or a content interface snap.
The current `ElfFile` class contains most of this information, in the form of the list of needed libraries together with the required symbol versions. What is missing is a list of symbol versions defined by the library. This PR adds that information to the class.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged into master. Adds defined symbol version extraction to the ElfFile class, enabling Snapcraft to detect missing or duplicate libraries. Approved by two reviewers, passed CI, and modified three files. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged into master. Adds defined symbol version extraction to the ElfFile class to enable future warnings for missing or duplicate snap libraries. Codecov noted a minor coverage decrease, but the changes were successfully integrated. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged into master. Adds defined symbol version extraction to the ElfFile class, enabling future Snapcraft warnings for missing or duplicate libraries. Accepted despite a minor overall coverage decrease. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2229 elf: extract build ID and presence of debug info | snapcraft | merged | Updates the ElfFile class to extract ELF build IDs and detect debug info presence. Merged after approval by two reviewers and passing CI checks. Simplifies section extraction logic to support debug symbol separation. | |
| #75 refactor: rewrite elf file support | debcraft | merged | Merged rewrite of ELF file support to better match deb building needs, replacing Snapcraft's implementation. Handles needed libraries; symbol support deferred. Approved by two reviewers, passed all CI checks, and resolves #72. | |
| #3839 elf: add elf file handler class | snapcraft | merged | Merged into main. Introduces an ELF file handler class with extraction helpers, ported from Snapcraft 6.x. Approved by a reviewer, rebased on main, and merged with a 0.46% test coverage increase. |