diff options
author | Alex Richardson <Alexander.Richardson@cl.cam.ac.uk> | 2021-06-17 12:18:13 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-06-24 14:57:51 (GMT) |
commit | 0da1540aaa8d36145329572938aeec6c86fb1ee7 (patch) | |
tree | f3831b276a19a1c870af6420065f155df0d8cc22 /Source/cmELF.h | |
parent | e21188df8bd08a5f306afc09bcb829d148b982d5 (diff) | |
download | CMake-0da1540aaa8d36145329572938aeec6c86fb1ee7.zip CMake-0da1540aaa8d36145329572938aeec6c86fb1ee7.tar.gz CMake-0da1540aaa8d36145329572938aeec6c86fb1ee7.tar.bz2 |
cmELF: Fix check for TagMipsRldMapRel
DT_MIPS_RLD_MAP_REL is a machine-speicific dynamic tag, so other
architectures could re-use the value of 0x70000035 to mean something
else. Before using DT_MIPS_RLD_MAP_REL, we have to check that the ELF
file is actually has a e_machine of EM_MIPS.
Diffstat (limited to 'Source/cmELF.h')
-rw-r--r-- | Source/cmELF.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmELF.h b/Source/cmELF.h index c479e2b..5700a38 100644 --- a/Source/cmELF.h +++ b/Source/cmELF.h @@ -98,6 +98,9 @@ public: /** Get the RUNPATH field if any. */ StringEntry const* GetRunPath(); + /** Returns true if the ELF file targets a MIPS CPU. */ + bool IsMIPS() const; + /** Print human-readable information about the ELF file. */ void PrintInfo(std::ostream& os) const; |