diff --git a/src/read/macho/dyld_cache.rs b/src/read/macho/dyld_cache.rs index a59876e..fb140f7 100644 --- a/src/read/macho/dyld_cache.rs +++ b/src/read/macho/dyld_cache.rs @@ -908,24 +908,14 @@ impl macho::DyldCacheHeader { impl macho::DyldCacheImageInfo { /// The file system path of this image. + /// + /// `data` should be the main cache file, not the subcache containing the image. pub fn path<'data, R: ReadRef<'data>>(&self, endian: E, data: R) -> Result<&'data [u8]> { let r_start = self.path_file_offset.get(endian).into(); let r_end = data.len().read_error("Couldn't get data len()")?; data.read_bytes_at_until(r_start..r_end, 0) .read_error("Couldn't read dyld cache image path") } - - /// Find the file offset of the image by looking up its address in the mappings. - pub fn file_offset<'data, R: ReadRef<'data>>( - &self, - endian: E, - mappings: &DyldCacheMappingSlice<'data, E, R>, - ) -> Result { - let address = self.address.get(endian); - mappings - .address_to_file_offset(address) - .read_error("Invalid dyld cache image address") - } } impl macho::DyldCacheMappingAndSlideInfo {