Skip to content

feat: Add ELF section parsing to BinaryInfo and cache LIEF object#81

Merged
danielplohmann merged 4 commits intodanielplohmann:masterfrom
r0ny123:elf-sections-support-6220374731347640469
Jan 16, 2026
Merged

feat: Add ELF section parsing to BinaryInfo and cache LIEF object#81
danielplohmann merged 4 commits intodanielplohmann:masterfrom
r0ny123:elf-sections-support-6220374731347640469

Conversation

@r0ny123
Copy link
Copy Markdown
Contributor

@r0ny123 r0ny123 commented Jan 16, 2026

No description provided.

google-labs-jules Bot and others added 4 commits January 16, 2026 09:54
Extends `BinaryInfo.getSections()` to support ELF binaries using LIEF.
Unlike PE sections, ELF sections are used with their raw virtual address
and size without 0x1000 alignment, as they are often packed tightly.

Modified `tests/testFileFormatParsers.py` to verify ELF section extraction
using the existing `bashlite` sample.
Refactors `BinaryInfo` to cache the `lief` parsed binary in `_lief_binary`,
improving performance by avoiding repeated parsing in `getOep`,
`getExportedFunctions`, etc.

Updates `getSections` to support both PE and ELF binaries, utilizing the
cached LIEF object and applying format-specific logic (0x1000 alignment
for PE, raw size for ELF).

Includes verification in `tests/testFileFormatParsers.py`.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@danielplohmann danielplohmann merged commit 2a247c1 into danielplohmann:master Jan 16, 2026
7 checks passed
@r0ny123 r0ny123 deleted the elf-sections-support-6220374731347640469 branch January 16, 2026 13:21
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