From 19e8858e3e1f0f330ad984e684f5a8abc231eb08 Mon Sep 17 00:00:00 2001 From: kevinheavey Date: Sat, 1 Jun 2024 16:22:03 +0400 Subject: [PATCH 1/2] use only required goblin features --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 60774f60..ecbf5bb9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ arbitrary = { version = "1.0", optional = true, features = ["derive"] } byteorder = "1.2" combine = "3.8.1" gdbstub = { version = "0.6.2", optional = true } -goblin = "0.5.1" +goblin = { version = "0.5.1", default-features = false, features = ["elf32", "elf64", "endian_fd", "std"] } hash32 = "0.2.0" log = "0.4.2" rand = { version = "0.8.5", features = ["small_rng"]} From 5bb122fc542dffe4c3a87a00b8fea4728e8cbf58 Mon Sep 17 00:00:00 2001 From: kevinheavey Date: Sat, 1 Jun 2024 17:20:50 +0400 Subject: [PATCH 2/2] deactivate std feature of goblin --- Cargo.toml | 2 +- src/elf_parser_glue.rs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ecbf5bb9..71ac81d4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ arbitrary = { version = "1.0", optional = true, features = ["derive"] } byteorder = "1.2" combine = "3.8.1" gdbstub = { version = "0.6.2", optional = true } -goblin = { version = "0.5.1", default-features = false, features = ["elf32", "elf64", "endian_fd", "std"] } +goblin = { version = "0.5.1", default-features = false, features = ["elf32", "elf64", "endian_fd"] } hash32 = "0.2.0" log = "0.4.2" rand = { version = "0.8.5", features = ["small_rng"]} diff --git a/src/elf_parser_glue.rs b/src/elf_parser_glue.rs index e04fe736..d4f4fd92 100644 --- a/src/elf_parser_glue.rs +++ b/src/elf_parser_glue.rs @@ -550,7 +550,6 @@ impl From for ElfError { GoblinError::Malformed(string) => Self::FailedToParse(format!("malformed: {string}")), GoblinError::BadMagic(magic) => Self::FailedToParse(format!("bad magic: {magic:#x}")), GoblinError::Scroll(error) => Self::FailedToParse(format!("read-write: {error}")), - GoblinError::IO(error) => Self::FailedToParse(format!("io: {error}")), GoblinError::BufferTooShort(n, error) => { Self::FailedToParse(format!("buffer too short {n} {error}")) }