summaryrefslogtreecommitdiff
path: root/rld-files.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rld-files.cpp')
-rw-r--r--rld-files.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/rld-files.cpp b/rld-files.cpp
index 05f54b3..94508a1 100644
--- a/rld-files.cpp
+++ b/rld-files.cpp
@@ -902,6 +902,7 @@ namespace rld
section::section (const elf::section& es)
: name (es.name ()),
+ index (es.index ()),
type (es.type ()),
size (es.size ()),
alignment (es.alignment ()),
@@ -930,6 +931,22 @@ namespace rld
return size;
}
+ const section*
+ find (const sections& secs, const int index)
+ {
+ for (sections::const_iterator si = secs.begin ();
+ si != secs.end ();
+ ++si)
+ {
+ const section& sec = *si;
+
+ if (index == sec.index)
+ return &sec;
+ }
+
+ return 0;
+ }
+
object::object (archive& archive_, file& name_)
: image (name_),
archive_ (&archive_),