summaryrefslogtreecommitdiff
path: root/rld-files.h
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2012-11-29 19:02:28 +1100
committerChris Johns <chrisj@rtems.org>2012-11-29 19:02:28 +1100
commit8485a331346f2729c835f03f6bd6939780bccbe5 (patch)
tree0c8f001619ec847291fe724a193714c613e6a76d /rld-files.h
parent14ba72fd1b30dfbe8a0635e0ae78a812b1dd4a46 (diff)
Add the index to the section.
The index is referenced in the symbol and relocation records of ELF files therefore we need to search for them.
Diffstat (limited to 'rld-files.h')
-rw-r--r--rld-files.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/rld-files.h b/rld-files.h
index fb8c644..de49b4c 100644
--- a/rld-files.h
+++ b/rld-files.h
@@ -518,6 +518,7 @@ namespace rld
struct section
{
const std::string name; //< The name of the section.
+ const int index; //< The section's index in the object file.
const uint32_t type; //< The type of section.
const size_t size; //< The size of the section.
const uint32_t alignment; //< The alignment of the section.
@@ -550,6 +551,11 @@ namespace rld
size_t sum_sizes (const sections& secs);
/**
+ * Find the section that matches the index in the sections provided.
+ */
+ const section* find (const sections& secs, const int index);
+
+ /**
* The object file cab be in an archive or a file.
*/
class object: