[Lldb-commits] [lldb] r123498 - /lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp

Stephen Wilson wilsons at start.ca
Fri Jan 14 16:09:50 PST 2011


Author: wilsons
Date: Fri Jan 14 18:09:50 2011
New Revision: 123498

URL: http://llvm.org/viewvc/llvm-project?rev=123498&view=rev
Log:
Test if an ELF object is executable by checking if an entry point is defined.

The previous check on header type ET_EXEC is not general enough.  Position
independent executables have type ET_DYN.


Modified:
    lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp

Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp?rev=123498&r1=123497&r2=123498&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Fri Jan 14 18:09:50 2011
@@ -159,7 +159,7 @@
 bool
 ObjectFileELF::IsExecutable() const
 {
-    return m_header.e_type == ET_EXEC;
+    return m_header.e_entry != 0;
 }
 
 Address





More information about the lldb-commits mailing list