Skip to content

Commit

Permalink
Fix up README example so it compiles
Browse files Browse the repository at this point in the history
Patch 9a6a265 forgot to update the old name of find_common_sections in the README, and since cargo test only compiles doc comments and
doesn't know about the README, I missed this.

Fixes #31
  • Loading branch information
cole14 committed Feb 21, 2023
1 parent c2799a1 commit 2ad70e5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ Release-target compilation times on this developer's 2021 m1 macbook are sub-sec
```rust
use elf::ElfBytes;
use elf::endian::AnyEndian;
use elf::hash::sysv_hash;
use elf::note::Note;
use elf::note::NoteGnuBuildId;
use elf::section::SectionHeader;
Expand Down Expand Up @@ -121,7 +120,7 @@ assert_eq!(
);

// Find lazy-parsing types for the common ELF sections (we want .dynsym, .dynstr, .hash)
let common = file.find_common_sections().expect("shdrs should parse");
let common = file.find_common_data().expect("shdrs should parse");
let (dynsyms, strtab) = (common.dynsyms.unwrap(), common.dynsyms_strs.unwrap());
let hash_table = common.sysv_hash.unwrap();

Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
//! ```
//! use elf::ElfBytes;
//! use elf::endian::AnyEndian;
//! use elf::hash::sysv_hash;
//! use elf::note::Note;
//! use elf::note::NoteGnuBuildId;
//! use elf::section::SectionHeader;
Expand Down

0 comments on commit 2ad70e5

Please sign in to comment.