diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-07-15 00:14:46 +0000 | 
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-07-15 00:14:46 +0000 | 
| commit | b1d80722a8bd7c81017ed68e68f74ed9b2004932 (patch) | |
| tree | 18f935140241411fc32086e9bfc2ba67dd3910dc /llvm | |
| parent | c998f71d141aac3d57c2c998da97edbcbf0bca91 (diff) | |
| download | bcm5719-llvm-b1d80722a8bd7c81017ed68e68f74ed9b2004932.tar.gz bcm5719-llvm-b1d80722a8bd7c81017ed68e68f74ed9b2004932.zip | |
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)
llvm-svn: 135228
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/Object/MachOObjectFile.cpp | 7 | 
1 files changed, 3 insertions, 4 deletions
| diff --git a/llvm/lib/Object/MachOObjectFile.cpp b/llvm/lib/Object/MachOObjectFile.cpp index 71f1f8cf4b7..37edefe99fa 100644 --- a/llvm/lib/Object/MachOObjectFile.cpp +++ b/llvm/lib/Object/MachOObjectFile.cpp @@ -276,10 +276,9 @@ error_code MachOObjectFile::getSectionContents(DataRefImpl DRI,  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;  } | 

