summaryrefslogtreecommitdiffstats
path: root/Source/cmELF.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-02-29 16:12:59 (GMT)
committerBrad King <brad.king@kitware.com>2008-02-29 16:12:59 (GMT)
commit03ef00bc93511b6909f022a143c93bbb29bc2c58 (patch)
treea18a77f9eca43242a1fc2209156aa110bfb34443 /Source/cmELF.h
parent44f696f8dae9a30cb69590954705511631153473 (diff)
downloadCMake-03ef00bc93511b6909f022a143c93bbb29bc2c58.zip
CMake-03ef00bc93511b6909f022a143c93bbb29bc2c58.tar.gz
CMake-03ef00bc93511b6909f022a143c93bbb29bc2c58.tar.bz2
ENH: Make cmELF parser more general and powerful
- Add support to get RPATH and RUNPATH entries. - Add support to get file offsets to strings. - Add more DT_* tags to byte swapping.
Diffstat (limited to 'Source/cmELF.h')
-rw-r--r--Source/cmELF.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/cmELF.h b/Source/cmELF.h
index 11bf354..716b3d2 100644
--- a/Source/cmELF.h
+++ b/Source/cmELF.h
@@ -54,6 +54,16 @@ public:
FileTypeCore
};
+ /** Represent string table entries. */
+ struct StringEntry
+ {
+ // The string value itself.
+ std::string Value;
+
+ // The position in the file at which the string appears.
+ unsigned long Position;
+ };
+
/** Get the type of the file opened. */
FileType GetFileType() const;
@@ -62,6 +72,13 @@ public:
/** Get the SONAME field if any. */
bool GetSOName(std::string& soname);
+ StringEntry const* GetSOName();
+
+ /** Get the RPATH field if any. */
+ StringEntry const* GetRPath();
+
+ /** Get the RUNPATH field if any. */
+ StringEntry const* GetRunPath();
/** Print human-readable information about the ELF file. */
void PrintInfo(std::ostream& os) const;