From 5b3bf956a5f54dcc50de383d9588dc377c361c33 Mon Sep 17 00:00:00 2001 From: Robin Lambertz Date: Wed, 20 Jul 2022 00:00:00 +0000 Subject: [PATCH] read/macho: add LoadCommandData::raw_data (#449) --- src/read/macho/load_command.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/read/macho/load_command.rs b/src/read/macho/load_command.rs index 29fab6e0..10daf4ed 100644 --- a/src/read/macho/load_command.rs +++ b/src/read/macho/load_command.rs @@ -77,6 +77,11 @@ impl<'data, E: Endian> LoadCommandData<'data, E> { .read_error("Invalid Mach-O command size") } + /// Raw bytes of this LoadCommand structure. + pub fn raw_data(&self) -> &'data [u8] { + self.data.0 + } + /// Parse a load command string value. /// /// Strings used by load commands are specified by offsets that are