From 2ad70e5db2b843bed230cdd7d7428483b6267348 Mon Sep 17 00:00:00 2001 From: Christopher Cole Date: Mon, 20 Feb 2023 18:26:36 -0800 Subject: [PATCH] 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 --- README.md | 3 +-- src/lib.rs | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 27d94e8..eae313f 100644 --- a/README.md +++ b/README.md @@ -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; @@ -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(); diff --git a/src/lib.rs b/src/lib.rs index 291e0c9..ea10f16 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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;