summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
diff options
context:
space:
mode:
authorStephen Wilson <wilsons@start.ca>2011-01-15 00:09:50 +0000
committerStephen Wilson <wilsons@start.ca>2011-01-15 00:09:50 +0000
commit7f3b57ca35f2c48999b7a087c7bcb95641c1b6e4 (patch)
tree6adf617c46d1ea452be13df643534b5b716dba97 /lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
parentb7a3c42eae5a6409ce984949e83d19f835f47afd (diff)
downloadbcm5719-llvm-7f3b57ca35f2c48999b7a087c7bcb95641c1b6e4.tar.gz
bcm5719-llvm-7f3b57ca35f2c48999b7a087c7bcb95641c1b6e4.zip
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. llvm-svn: 123498
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp')
-rw-r--r--lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
index 5b99d01944f..f58c779819f 100644
--- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ b/lldb/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
OpenPOWER on IntegriCloud