Skip to content

Commit

Permalink
Added some doc comments to relocation iterator.
Browse files Browse the repository at this point in the history
  • Loading branch information
ibabushkin committed Sep 30, 2018
1 parent e49b74b commit c497c84
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/elf/reloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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<RelocSection<'a>> {
// TODO: better error message when too large (see symtab implementation)
let bytes = bytes.pread_with(offset, filesz)?;
Expand Down

0 comments on commit c497c84

Please sign in to comment.