mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-07 04:21:39 +00:00
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)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135228 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
79a6a48851
commit
82ba5b7c40
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user