Skip to content

v0.7.0

Compare
Choose a tag to compare
@cole14 cole14 released this 14 Nov 21:14
· 54 commits to master since this release
v0.7.0
9f552d8

[0.7.0] - 2022-11-14

New Features

Add new ElfBytes type with better ergonomics for parsing from a &[u8]
Add GnuHashTable which interprets the contents of a SHT_GNU_HASH section
Add convenience method section_header_by_name to ElfBytes and ElfStream
Add GnuBuildIdNote and parsing for NT_GNU_BUILD_ID note contents
Add GnuAbiTagNote and parsing for NT_GNU_ABI_TAG note contents
Add ElfBytes::symbol_version_table() to get the GNU extension symbol version table.
Add ElfBytes::find_common_data() to efficiently discover common ELF structures
Add a new endian-aware integer parsing trait impl
Add ParsingTable.is_empty()
Add abi constants for powerpc and powerpc64
Add abi constants for RISC-V
Add abi constants for x86_64
Add abi constants for ARM32 and ARM64 (AARCH64)
Add abi constant for GNU-extension ELF note name ELF_NOTE_GNU
Add abi constant for PT_GNU_PROPERTY
Add abi constants for SHN_ABS and SHN_COMMON
Add elf::to_str::d_tag_to_str()
Add elf::to_str::note_abi_tag_os_to_str()

Changed Interfaces

Rename elf::File -> elf::ElfStream and make it specific to the Read + Seek interface
Rename gabi -> abi since it also includes extension constants
Make ELF structures generic across the new endian-aware integer parsing trait EndianParse
Refactor parsed Note type to be a typed enum
Rename ElfStream::dynamic_section() -> dynamic() to match ElfBytes
Change ElfStream::dynamic() to yield a DynamicTable just like in ElfBytes
Standardize ElfBytes' interfaces for the .dynamic contents to return a DynamicTable
Export the parsing utilities ParsingTable, ParsingIterator in the public interface
Refactor section_headers_with_strtab to work with files that have shdrs but no shstrtab
Remove redundant hash arg from SysVHashTable.find()
Expose Class in the public interface alongside FileHeader
Remove opinionated Display impl for file::Class
Remove section_data_as_symbol_table() from public ElfBytes interface
Change SymbolVersionTable::new() to take Options instead of Default-empty iterators
Change ElfStream to parse out the ProgramHeaders into an allocated vec as part of ElfStream::open_stream()
Change ElfStream to parse out the SectionHeaders into an allocated Vec as part of ElfStream::open_stream()

Bug Fixes

Properly parse program header table when ehdr.e_phnum > 0xffff
Fix OOM in ElfStream parsing when parsing corrupted files
Fix a divide by zero panic in SysVHashTable.find() for empty tables

Misc Improvements

Add more fuzz testing
Add some simple parsing smoke tests for the various sample architecture objects
Add sample object and testing with > 0xff00 section headers
Add a lot more doc comments to each of the modules