diff options
author | Tim Northover <Tim.Northover@arm.com> | 2012-12-17 17:59:32 +0000 |
---|---|---|
committer | Tim Northover <Tim.Northover@arm.com> | 2012-12-17 17:59:32 +0000 |
commit | 1c2b2f9c56c01aa1c317da4fd0234eaa1fe6e739 (patch) | |
tree | c9a50c3e1d261072b9a81cb9efb07b20f45b281c /lib/Object | |
parent | 2dfa3eb56679fcb0ac36d2956924e59acf4fc19e (diff) |
Teach MachO which sections contain code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170349 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Object')
-rw-r--r-- | lib/Object/MachOObjectFile.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Object/MachOObjectFile.cpp b/lib/Object/MachOObjectFile.cpp index a38fac78aa..40f5390a96 100644 --- a/lib/Object/MachOObjectFile.cpp +++ b/lib/Object/MachOObjectFile.cpp @@ -559,11 +559,11 @@ error_code MachOObjectFile::isSectionText(DataRefImpl DRI, if (is64BitLoadCommand(MachOObj.get(), DRI)) { InMemoryStruct<macho::Section64> Sect; getSection64(DRI, Sect); - Result = !strcmp(Sect->Name, "__text"); + Result = Sect->Flags & macho::SF_PureInstructions; } else { InMemoryStruct<macho::Section> Sect; getSection(DRI, Sect); - Result = !strcmp(Sect->Name, "__text"); + Result = Sect->Flags & macho::SF_PureInstructions; } return object_error::success; } |