[llvm-commits] [llvm] r135228 - /llvm/trunk/lib/Object/MachOObjectFile.cpp
Benjamin Kramer
benny.kra at googlemail.com
Thu Jul 14 17:14:46 PDT 2011
Author: d0k
Date: Thu Jul 14 19:14:46 2011
New Revision: 135228
URL: http://llvm.org/viewvc/llvm-project?rev=135228&view=rev
Log:
MachOObjectFile: Change isSectionText to return true for sections named text, not for load commands name __TEXT (which isn't the case in actual object files)
Modified:
llvm/trunk/lib/Object/MachOObjectFile.cpp
Modified: llvm/trunk/lib/Object/MachOObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/MachOObjectFile.cpp?rev=135228&r1=135227&r2=135228&view=diff
==============================================================================
--- llvm/trunk/lib/Object/MachOObjectFile.cpp (original)
+++ llvm/trunk/lib/Object/MachOObjectFile.cpp Thu Jul 14 19:14:46 2011
@@ -276,10 +276,9 @@
error_code MachOObjectFile::isSectionText(DataRefImpl DRI,
bool &Result) const {
- InMemoryStruct<macho::SegmentLoadCommand> SLC;
- LoadCommandInfo LCI = MachOObj->getLoadCommandInfo(DRI.d.a);
- MachOObj->ReadSegmentLoadCommand(LCI, SLC);
- Result = !strcmp(SLC->Name, "__TEXT");
+ InMemoryStruct<macho::Section> Sect;
+ getSection(DRI, Sect);
+ Result = !strcmp(Sect->Name, "__text");
return object_error::success;
}
More information about the llvm-commits
mailing list