Commit Graph

  • 419cd311de Merge Read/Seek stream input traits master alnyan 2023-07-20 18:36:30 +03:00
  • 9f36ba0ffa Fix builds in no_std environments alnyan 2023-07-19 17:50:05 +03:00
  • 1436aab797 Add no-std ElfStream support alnyan 2023-07-19 17:13:56 +03:00
  • b7067d3307 Enable #![warn(rust_2018_idioms)] This helps catch deprecated idioms so we can be proactively clean Christopher Cole 2023-06-08 13:55:24 -07:00
  • bee2d247bd Turn on #![deny(missing_debug_implementations)] This helps ensure we're deriving Debug, as it's generally always helpful. This helps avoid issues like #33 Christopher Cole 2023-06-08 13:51:21 -07:00
  • a853cb24bd Add NoteAny::name_str() helper to parse the note name as valid UTF8 Christopher Cole 2023-06-06 12:07:55 -07:00
  • d29e9964dc Relax NoteAny parsing to allow notes with names that contain invalid utf8 sequences We want NoteAny to be a catch-all note type that can represent any valid note that we don't know how to parse into something more specific. Christopher Cole 2023-06-06 11:34:54 -07:00
  • 10957838b8 Fix doc comment on file::Class Christopher Cole 2023-05-16 21:48:17 -07:00
  • a2fa6a194e Derive Debug on LittleEndian and BigEndian This addresses #33 Christopher Cole 2023-05-05 12:01:16 -07:00
  • 969c18469d Replace some range loop expressions in tests with iterators This cleans up clippy warnings Christopher Cole 2023-05-05 11:52:38 -07:00
  • a488df66db Explicitly specify test data literals as hex in note.rs Christopher Cole 2023-05-05 11:42:35 -07:00
  • 2ad70e5db2 Fix up README example so it compiles Christopher Cole 2023-02-20 18:26:36 -08:00
  • c2799a1d75 Bump crate version to 0.7.2 Christopher Cole 2023-02-15 15:38:08 -08:00
  • 1181e6b70b Reorder README/doc comment feature list Christopher Cole 2023-02-15 15:21:13 -08:00
  • db0c3938a0 Rewrite docs section about unsafe code Christopher Cole 2023-02-09 01:42:02 -08:00
  • dea6edfdf7 Fix an 'attempt to shift right with overflow' panic in the GnuHashTable if nshift is wider than the bloom filter word size Christopher Cole 2023-02-07 22:47:43 -08:00
  • 5f4014de1f Fix some abi comments so that they don't accidentally pollute unrelated doc comments Christopher Cole 2023-01-26 18:05:08 -08:00
  • 72c6af75b0 Change abi EM_* comments into doc comments Christopher Cole 2023-01-26 17:56:13 -08:00
  • e6a1b963f6 Add C-style definitions for Elf[32|64]_Ehdr Christopher Cole 2023-01-26 17:43:14 -08:00
  • e786ecfcf9 Add C-style definitions for Elf[32|64]_Dyn Christopher Cole 2023-01-26 13:47:05 -08:00
  • ff57f74d26 Add abi constants for note descriptor types (n_type) Christopher Cole 2023-01-26 13:37:00 -08:00
  • 04242deb6f Add C-style definitions for Elf[32|64]_Phdr Christopher Cole 2023-01-26 13:18:58 -08:00
  • 840dd99239 Add C-style definitions for Elf[32|64]_Rel and Elf[32|64]_Rela Christopher Cole 2023-01-26 13:14:41 -08:00
  • ee705369b0 Add C-style definitions for Elf[32|64]_Sym Christopher Cole 2023-01-26 13:06:13 -08:00
  • 8ed49b6a4c Add C-style definitions for Elf[32|64]_Chdr Christopher Cole 2023-01-26 12:58:58 -08:00
  • 161f679004 Combine some derives into one directive in endian.rs Christopher Cole 2023-01-26 12:54:59 -08:00
  • 9d4c50ad18 Add C-style definitions for Elf[32|64]_Shdr Christopher Cole 2023-01-26 12:46:04 -08:00
  • 332a42a2a3 Fix doc comment formatting to keep [] subscripting in some abi.rs comments Christopher Cole 2023-01-26 12:09:36 -08:00
  • 9035474869 Tweak formatting of doc comments on reloc abi constants Christopher Cole 2023-01-26 12:05:29 -08:00
  • a502f95b01 Apply fixes suggested by cargo +nightly clippy Christopher Cole 2023-01-21 12:08:41 -08:00
  • b1883750b1 Add comment explaining what the nightly cargo feature provides Christopher Cole 2023-01-21 12:01:38 -08:00
  • b53647d782 Add a changelog comparison link for v0.7.1 Christopher Cole 2023-01-17 21:43:33 -08:00
  • bddf58a950 Implement core::error::Error for ParsingError jlxip 2023-01-11 02:57:24 +01:00
  • da1e25f338 Bump crate version to v0.7.1 Christopher Cole 2023-01-08 14:28:30 -08:00
  • f45969a2e2 fix comment CT 2022-12-21 15:20:31 +01:00
  • 9192854af5 return None if nbloom is zero to avoid potential overflows in malformed gnu hash headers CT 2022-12-21 13:21:21 +01:00
  • 1ed0bdd654 Add tag comparison links for changelog versions Christopher Cole 2022-11-14 13:25:34 -08:00
  • 9f552d85f1 Bump crate version to v0.7.0 Christopher Cole 2022-11-14 12:22:56 -08:00
  • 6ce804dbd2 Add a CHANGELOG.md to track changes in each released version Christopher Cole 2022-11-14 12:14:03 -08:00
  • 73e5e94c39 Export the parsing utilities in the public interface 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. Christopher Cole 2022-11-13 19:21:10 -08:00
  • 5a933389a8 Add fuzz/coverage/ to .gitignore Christopher Cole 2022-11-13 19:06:41 -08:00
  • f0ef935418 Use symver.so in GNU symbol versioning interface tests Christopher Cole 2022-11-13 18:39:55 -08:00
  • ea3605ed29 Simplify the notes fuzz target to just fuzz note parsing Christopher Cole 2022-11-13 17:24:26 -08:00
  • a8c1125fa5 Move U32Table definition over to its one usage in hash.rs Christopher Cole 2022-11-13 13:58:48 -08:00
  • 910a46ef9d Add ParsingTable.is_empty() Christopher Cole 2022-11-13 13:53:13 -08:00
  • 0f849a1e17 Run cargo clippy --fix Christopher Cole 2022-11-13 13:14:12 -08:00
  • 9a6a265afc Rename CommonElfSections -> CommonElfData Christopher Cole 2022-11-12 13:35:07 -08:00
  • 19e7f685c8 Refactor endianness storage so its not duplicated on FileHeader and ElfBytes+ElfStream Christopher Cole 2022-11-12 13:28:58 -08:00
  • 4875ff8981 Remove opinionated Display impl for file::Class Christopher Cole 2022-11-12 12:12:49 -08:00
  • 2e05d70302 Handle the case where ehdr.e_phnum > 0xffff Christopher Cole 2022-11-10 13:31:20 -08:00
  • c5fba3b0ab Refactor section_headers_with_strtab to work with files that have shdrs but no shstrtab Christopher Cole 2022-11-10 12:02:40 -08:00
  • 2faf0ca1b0 Update common fuzz target for hash table change Christopher Cole 2022-11-09 19:44:23 -08:00
  • 4bdcb7db5f Rework the top level documentation a bit Christopher Cole 2022-11-09 19:35:14 -08:00
  • 44f84dd0d8 Remove redundant hash arg from SysVHashTable.find() Christopher Cole 2022-11-09 18:45:19 -08:00
  • aea8a233e2 Add some more unit tests for ParsingTable Christopher Cole 2022-11-09 17:39:37 -08:00
  • 4df35c65ca Exclude .gitignore, .github/ and sample-objects/ from packaged crate Christopher Cole 2022-11-09 16:32:16 -08:00
  • 33e3435a7f Add sample object with with > 0xff00 section headers Christopher Cole 2022-11-09 15:57:29 -08:00
  • f747747929 Add abi constants for powerpc and powerpc64 Christopher Cole 2022-11-08 14:02:26 -08:00
  • 19d26ae4e5 Add abi constants for RISC-V Christopher Cole 2022-11-08 13:16:32 -08:00
  • 8e5b699c6e Add abi constants for x86_64 Christopher Cole 2022-11-08 12:39:45 -08:00
  • 6fc477c645 Tweak some doc comments Christopher Cole 2022-11-08 11:56:32 -08:00
  • 1ce4958375 Rename ElfStream::dynamic_section() -> dynamic() to match ElfBytes Christopher Cole 2022-11-08 11:25:42 -08:00
  • 92f3d361c3 Change ElfStream::dynamic() to yield a DynamicTable just like in ElfBytes Christopher Cole 2022-11-08 11:23:27 -08:00
  • 39fe7f1a93 Add elf::to_str::d_tag_to_str() Christopher Cole 2022-11-08 11:00:07 -08:00
  • 8752084524 Move elf file Class enum over into file.rs Christopher Cole 2022-11-08 09:54:05 -08:00
  • 1161178443 Use helper ReadBytesExt trait in a few more places Christopher Cole 2022-11-08 09:46:25 -08:00
  • 4fa888778f Add GnuHashTable which interprets the contents of a SHT_GNU_HASH section Christopher Cole 2022-11-07 23:21:05 -08:00
  • b50d19c244 Add some simple parsing smoke tests for the various sample architecture objects Christopher Cole 2022-11-07 15:26:03 -08:00
  • dd8e9c7814 Add some sample objects for various architectures Christopher Cole 2022-11-07 14:54:24 -08:00
  • 073bd44ee3 Parse the ProgramHeaders into an allocated vec as part of ElfStream::open_stream() Christopher Cole 2022-11-07 14:11:46 -08:00
  • 643d83f078 Add abi constants for ARM32 and ARM64 (AARCH64) Christopher Cole 2022-11-07 13:30:59 -08:00
  • 2fa91412c2 CI: Go back to manual rustup+cargo install Christopher Cole 2022-11-06 19:54:24 -08:00
  • af1b4145ac Github action: make corpus cache additive Christopher Cole 2022-11-06 19:41:42 -08:00
  • 324ccfd14f Use actions-rs toolchain step in our fuzz action Christopher Cole 2022-11-06 19:32:41 -08:00
  • 16eed7f136 Run the stream fuzz target during github action Christopher Cole 2022-11-06 19:27:35 -08:00
  • b73ed8ebd8 CI: Attempt at caching the fuzzing corpus Christopher Cole 2022-11-06 19:15:30 -08:00
  • 7672d5cf93 Rename sample object files used in tests to be more descriptive Christopher Cole 2022-11-06 18:54:41 -08:00
  • 73a847719f Add to_str method note_abi_tag_os_to_str() Christopher Cole 2022-11-06 18:35:57 -08:00
  • 0bdefe6ebf Remove section_data_as_symbol_table() from public ElfBytes interface Christopher Cole 2022-11-06 17:43:04 -08:00
  • 498232ee7e Add interface test for sysv_hash table on ElfBytes from find_common_sections() Christopher Cole 2022-11-06 17:31:04 -08:00
  • cb987d1846 Update the README.md and top-level crate doc comment with new example Christopher Cole 2022-11-06 14:33:50 -08:00
  • 6d20b5a8f0 Add convenience method section_header_by_name to ElfBytes and ElfStream Christopher Cole 2022-11-06 14:05:08 -08:00
  • f72ce6d26b Add doc comment example for getting parsed notes Christopher Cole 2022-11-06 13:34:15 -08:00
  • 043238d83f Refactor parsed Note type to lift enum up to the top level Christopher Cole 2022-11-06 13:21:16 -08:00
  • c436b84eba Include the os field when parsing an NT_GNU_ABI_TAG desc Christopher Cole 2022-11-06 12:28:47 -08:00
  • bc5e3c4f60 Add GnuBuildIdDesc and associated NoteDesc::GnuBuildId variant Christopher Cole 2022-11-06 12:18:15 -08:00
  • d4ee10f532 Add NoteDesc enum and parsing for NT_GNU_ABI_TAG note desc contents Christopher Cole 2022-11-06 12:02:37 -08:00
  • 2efd9b2ec7 Add abi constant for GNU-extension ELF note name ELF_NOTE_GNU Christopher Cole 2022-11-06 11:19:54 -08:00
  • b845d2736a Remove pub from CachingReader methods - this is an internal type Christopher Cole 2022-11-05 18:56:50 -07:00
  • b53237960b Fix OOM in ElfStream parsing when parsing corrupted files Christopher Cole 2022-11-05 18:40:58 -07:00
  • f9d1e47589 Make ElfStream parse out the SectionHeaders into an allocated Vec as part of open_stream() Christopher Cole 2022-11-05 18:13:07 -07:00
  • c06ae21afa Expose Class in the public interface alongside FileHeader (where its used) Christopher Cole 2022-11-05 15:07:23 -07:00
  • 903653eba2 Update fuzzing github action for new common target Christopher Cole 2022-11-05 14:25:34 -07:00
  • 40240fc4af Fix a divide by zero panic in SysVHashTable.find() for empty tables Christopher Cole 2022-11-05 14:18:58 -07:00
  • 6efd7c177f Standardize ElfBytes' interfaces for the .dynamic contents to return a DynamicTable Christopher Cole 2022-11-05 13:55:23 -07:00
  • 40799c6961 Add ElfBytes::symbol_version_table() to get the GNU extension symbol version table. Christopher Cole 2022-11-05 13:39:02 -07:00
  • bd36bba238 Update the crate doc comment Christopher Cole 2022-11-04 23:46:16 -07:00
  • 765dd6984a Change endian parse to return ParseError::SliceReadError when failing to get the slice to parse from Christopher Cole 2022-11-04 23:20:34 -07:00
  • 5ec40c8731 Move FileHeader back into file.rs Christopher Cole 2022-11-04 23:16:58 -07:00
  • ae16e4762e Rename file.rs -> elf_stream.rs Christopher Cole 2022-11-04 23:08:26 -07:00