These are just comments that are helpful for delineating groups of constants and were incorrectly
being rendered as part of the doc comment of the immediately-following symbol.
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
This allows external users to see ParsingTable, ParsingIterator.
This helps users know what they can do with these structures, and makes them
show up in docs, etc.
This eliminates the funky double-storage of the endianness spec and removes the unparsed u8 storage
of ei_data off FileHeader. Now, FileHeader just stores the appropriate parsed endianness spec enum,
and all methods that want to use it grab it from there.
This type derives Debug, so you can "{:?}" format it to get a string like ELF32/ELF64,
which is intuitive to me. If someone wants some other human readable format, they can implement
it themselves.
If the number of segments is greater than or equal to PN_XNUM (0xffff),
e_phnum is set to PN_XNUM, and the actual number of program header table
entries is contained in the sh_info field of the section header at index 0.
The phnum.m68k.so is a sample object file that tests this code path but then
actually only has 1 segment - it just indirects phnum through shdr0.
The spec allows for ELF files that have section header tables but no shstrtab. In this case,
we want to still be able to get the section headers, but signal that there was no shstrtab with
an empty option.
These check that there's no special alignment constraint for parsing a ParseAt out of a bytes buffer,
and a simple error case for failing to parse because the bytes are too small to parse the type.