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 | 5edabc131a091a82b15a8166aa3d4d6c9bd8d85f (patch) | |
tree | 71d74c21b361d3200a8a7b45ad2fe8035cea51bc /llvm/lib/Object/MachOObjectFile.cpp | |
parent | 926758ba4500e95eb2c40708b165090c66d8f199 (diff) | |
download | bcm5719-llvm-5edabc131a091a82b15a8166aa3d4d6c9bd8d85f.tar.gz bcm5719-llvm-5edabc131a091a82b15a8166aa3d4d6c9bd8d85f.zip |
Teach MachO which sections contain code
llvm-svn: 170349
Diffstat (limited to 'llvm/lib/Object/MachOObjectFile.cpp')
-rw-r--r-- | llvm/lib/Object/MachOObjectFile.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Object/MachOObjectFile.cpp b/llvm/lib/Object/MachOObjectFile.cpp index a38fac78aae..40f5390a96f 100644 --- a/llvm/lib/Object/MachOObjectFile.cpp +++ b/llvm/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; } |