[Lldb-commits] [PATCH 3/8] Test if an ELF object is executable by checking if an entry point is defined.
Stephen Wilson
wilsons at start.ca
Fri Jan 14 13:12:17 PST 2011
The previous check on header type ET_EXEC is not general enough. Position
independent executables have type ET_DYN.
---
source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
index 5b99d01..f58c779 100644
--- a/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ b/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -159,7 +159,7 @@ ObjectFileELF::~ObjectFileELF()
bool
ObjectFileELF::IsExecutable() const
{
- return m_header.e_type == ET_EXEC;
+ return m_header.e_entry != 0;
}
Address
--
1.7.3.5
More information about the lldb-commits
mailing list