Fix up README example so it compiles
Patch 9a6a265a 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
This commit is contained in:
parent
c2799a1d75
commit
2ad70e5db2
@ -93,7 +93,6 @@ Release-target compilation times on this developer's 2021 m1 macbook are sub-sec
|
|||||||
```rust
|
```rust
|
||||||
use elf::ElfBytes;
|
use elf::ElfBytes;
|
||||||
use elf::endian::AnyEndian;
|
use elf::endian::AnyEndian;
|
||||||
use elf::hash::sysv_hash;
|
|
||||||
use elf::note::Note;
|
use elf::note::Note;
|
||||||
use elf::note::NoteGnuBuildId;
|
use elf::note::NoteGnuBuildId;
|
||||||
use elf::section::SectionHeader;
|
use elf::section::SectionHeader;
|
||||||
@ -121,7 +120,7 @@ assert_eq!(
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Find lazy-parsing types for the common ELF sections (we want .dynsym, .dynstr, .hash)
|
// 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 (dynsyms, strtab) = (common.dynsyms.unwrap(), common.dynsyms_strs.unwrap());
|
||||||
let hash_table = common.sysv_hash.unwrap();
|
let hash_table = common.sysv_hash.unwrap();
|
||||||
|
|
||||||
|
@ -83,7 +83,6 @@
|
|||||||
//! ```
|
//! ```
|
||||||
//! use elf::ElfBytes;
|
//! use elf::ElfBytes;
|
||||||
//! use elf::endian::AnyEndian;
|
//! use elf::endian::AnyEndian;
|
||||||
//! use elf::hash::sysv_hash;
|
|
||||||
//! use elf::note::Note;
|
//! use elf::note::Note;
|
||||||
//! use elf::note::NoteGnuBuildId;
|
//! use elf::note::NoteGnuBuildId;
|
||||||
//! use elf::section::SectionHeader;
|
//! use elf::section::SectionHeader;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user