Skip to content

Commit

Permalink
elf: Add convinent functions for symbol write
Browse files Browse the repository at this point in the history
  • Loading branch information
tiann committed Jan 11, 2024
1 parent 1b30473 commit 138d40d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/elf/sym.rs
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,18 @@ if_alloc! {
self.count
}

/// The offset of symbol table in elf
#[inline]
pub fn offset(&self) -> usize {
self.start
}

/// The ctx of symbol table
#[inline]
pub fn ctx(&self) -> &Ctx {
&self.ctx
}

/// Returns true if table has no symbols.
#[inline]
pub fn is_empty(&self) -> bool {
Expand Down

0 comments on commit 138d40d

Please sign in to comment.