Skip to content

_make_gnu_versym_section: {str -> sym}tab #603

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 13, 2025
Merged

Conversation

pmhahn
Copy link
Contributor

@pmhahn pmhahn commented Mar 13, 2025

Class GNUVerSymSection has an associated SymbolTableSection that's passed in the constructor, but in _make_gnu_versym_section() the variables are named linked_strtab_index and strtab_section. Rename them to …_symtab_… as with all the other cases.

Also use the helper method _get_linked_symtab_section() which also checks the type for correctness compared to plain get_section() introduced later by 9257a0f ("Exceptions on malformed ELF header contents (#552)").

Fixes: 7b24670 ("added support for version definition, version dependency and version symbol sections in pyelftools and readelf.py")

Found while working on #514

Class `GNUVerSymSection` has an associated `SymbolTableSection` that's
passed in the constructor, but in `_make_gnu_versym_section()` the
variables are named `linked_strtab_index` and `strtab_section`. Rename
them to `…_symtab_…` as with all the other cases.

Also use the helper method `_get_linked_symtab_section()` which also
checks the type for correctness compared to plain `get_section()`
introduced later by 9257a0f ("Exceptions on malformed ELF header
contents (eliben#552)").

Fixes: 7b24670 ("added support for version definition, version dependency and version symbol sections in pyelftools and readelf.py")
Signed-off-by: Philipp Hahn <[email protected]>
@eliben eliben merged commit 6504945 into eliben:main Mar 13, 2025
4 checks passed
@pmhahn pmhahn deleted the gnuver branch March 14, 2025 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants