summaryrefslogtreecommitdiffstats
path: root/Source/cmELF.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-04-14 19:02:24 (GMT)
committerBrad King <brad.king@kitware.com>2008-04-14 19:02:24 (GMT)
commit3ff5404ccaeefbf4d53efcf86cd3a7d45d8e87e9 (patch)
treefbc64ce256bd09954a864ead572a1594fd14bf94 /Source/cmELF.h
parent9b8404a30516b629ad9ebc7322d58b18ce034858 (diff)
downloadCMake-3ff5404ccaeefbf4d53efcf86cd3a7d45d8e87e9.zip
CMake-3ff5404ccaeefbf4d53efcf86cd3a7d45d8e87e9.tar.gz
CMake-3ff5404ccaeefbf4d53efcf86cd3a7d45d8e87e9.tar.bz2
ENH: Added cmELF methods to get information about DYNAMIC section entries.
Diffstat (limited to 'Source/cmELF.h')
-rw-r--r--Source/cmELF.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/cmELF.h b/Source/cmELF.h
index 9e4575b..aeb4096 100644
--- a/Source/cmELF.h
+++ b/Source/cmELF.h
@@ -68,6 +68,9 @@ public:
// The size of the string table entry. This includes the space
// allocated for one or more null terminators.
unsigned long Size;
+
+ // The index of the section entry referencing the string.
+ int IndexInSection;
};
/** Get the type of the file opened. */
@@ -76,6 +79,17 @@ public:
/** Get the number of ELF sections present. */
unsigned int GetNumberOfSections() const;
+ /** Get the number of DYNAMIC section entries before the first
+ DT_NULL. Returns zero on error. */
+ unsigned int GetDynamicEntryCount() const;
+
+ /** Get the position of a DYNAMIC section header entry. Returns
+ zero on error. */
+ unsigned long GetDynamicEntryPosition(int index) const;
+
+ /** Read bytes from the file. */
+ bool ReadBytes(unsigned long pos, unsigned long size, char* buf) const;
+
/** Get the SONAME field if any. */
bool GetSOName(std::string& soname);
StringEntry const* GetSOName();