From 3df103a53ce0b50a65bb1c123b2ddee26632ec86 Mon Sep 17 00:00:00 2001 From: Koute Date: Mon, 24 Jul 2023 12:40:20 +0100 Subject: [PATCH] read/elf: add `ElfSymbol::raw_symbol` (#562) --- src/read/elf/symbol.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/read/elf/symbol.rs b/src/read/elf/symbol.rs index ac109570..ee5aa37f 100644 --- a/src/read/elf/symbol.rs +++ b/src/read/elf/symbol.rs @@ -309,6 +309,14 @@ where pub(super) symbol: &'data Elf::Sym, } +impl<'data, 'file, Elf: FileHeader, R: ReadRef<'data>> ElfSymbol<'data, 'file, Elf, R> { + /// Return a reference to the raw symbol structure. + #[inline] + pub fn raw_symbol(&self) -> &'data Elf::Sym { + self.symbol + } +} + impl<'data, 'file, Elf: FileHeader, R: ReadRef<'data>> read::private::Sealed for ElfSymbol<'data, 'file, Elf, R> {