From c497c84e485b4b879f78336866e96142e7615982 Mon Sep 17 00:00:00 2001 From: Inokentiy Babushkin Date: Sun, 30 Sep 2018 13:49:05 +0200 Subject: [PATCH] Added some doc comments to relocation iterator. --- src/elf/reloc.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/elf/reloc.rs b/src/elf/reloc.rs index ffc1fc903..d37a9e3a4 100644 --- a/src/elf/reloc.rs +++ b/src/elf/reloc.rs @@ -382,6 +382,7 @@ if_alloc! { } #[derive(Default)] + /// An ELF section containing relocations, allowing lazy iteration over symbols. pub struct RelocSection<'a> { bytes: &'a [u8], count: usize, @@ -404,6 +405,7 @@ if_alloc! { impl<'a> RelocSection<'a> { #[cfg(feature = "endian_fd")] + /// Parse a REL or RELA section of size `filesz` from `offset`. pub fn parse(bytes: &'a [u8], offset: usize, filesz: usize, is_rela: bool, ctx: Ctx) -> ::error::Result> { // TODO: better error message when too large (see symtab implementation) let bytes = bytes.pread_with(offset, filesz)?;