mirror of
https://github.com/intel/llvm.git
synced 2026-01-21 12:19:23 +08:00
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
This commit is contained in:
@@ -159,7 +159,7 @@ ObjectFileELF::~ObjectFileELF()
|
||||
bool
|
||||
ObjectFileELF::IsExecutable() const
|
||||
{
|
||||
return m_header.e_type == ET_EXEC;
|
||||
return m_header.e_entry != 0;
|
||||
}
|
||||
|
||||
Address
|
||||
|
||||
Reference in New Issue
Block a user