From 14ba72fd1b30dfbe8a0635e0ae78a812b1dd4a46 Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Thu, 29 Nov 2012 19:01:43 +1100 Subject: Add access to the value and info fields of a symbols. --- rld-symbols.cpp | 12 ++++++++++++ rld-symbols.h | 10 ++++++++++ 2 files changed, 22 insertions(+) diff --git a/rld-symbols.cpp b/rld-symbols.cpp index 127bb2f..3174ce4 100644 --- a/rld-symbols.cpp +++ b/rld-symbols.cpp @@ -140,6 +140,18 @@ namespace rld return esym_.st_shndx; } + elf::elf_addr + symbol::value () const + { + return esym_.st_value; + } + + uint32_t + symbol::info () const + { + return esym_.st_info; + } + rld::files::object* symbol::object () const { diff --git a/rld-symbols.h b/rld-symbols.h index 43e8ef5..dcb0d3e 100644 --- a/rld-symbols.h +++ b/rld-symbols.h @@ -109,6 +109,16 @@ namespace rld */ int index () const; + /** + * The value of the symbol. + */ + elf::elf_addr value () const; + + /** + * The data of the symbol. + */ + uint32_t info () const; + /** * The symbol's object file name. */ -- cgit v1.2.3