From 1c2b2f9c56c01aa1c317da4fd0234eaa1fe6e739 Mon Sep 17 00:00:00 2001 From: Tim Northover Date: Mon, 17 Dec 2012 17:59:32 +0000 Subject: Teach MachO which sections contain code git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170349 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Object/MachOObjectFile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Object') 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 Sect; getSection64(DRI, Sect); - Result = !strcmp(Sect->Name, "__text"); + Result = Sect->Flags & macho::SF_PureInstructions; } else { InMemoryStruct Sect; getSection(DRI, Sect); - Result = !strcmp(Sect->Name, "__text"); + Result = Sect->Flags & macho::SF_PureInstructions; } return object_error::success; } -- cgit v1.2.3-18-g5258