mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 21:24:00 +00:00
Don't fetch pointers from a InMemoryStruct.
InMemoryStruct is extremely dangerous as it returns data from an internal buffer when the endiannes doesn't match. This should fix the tests on big endian hosts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178875 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -257,8 +257,7 @@ static void DisassembleObject(const ObjectFile *Obj, bool InlineRelocs) {
|
||||
StringRef SegmentName = "";
|
||||
if (const MachOObjectFile *MachO = dyn_cast<const MachOObjectFile>(Obj)) {
|
||||
DataRefImpl DR = i->getRawDataRefImpl();
|
||||
if (error(MachO->getSectionFinalSegmentName(DR, SegmentName)))
|
||||
break;
|
||||
SegmentName = MachO->getSectionFinalSegmentName(DR);
|
||||
}
|
||||
StringRef name;
|
||||
if (error(i->getName(name))) break;
|
||||
@ -593,10 +592,8 @@ static void PrintSymbolTable(const ObjectFile *o) {
|
||||
outs() << "*UND*";
|
||||
else {
|
||||
if (const MachOObjectFile *MachO = dyn_cast<const MachOObjectFile>(o)) {
|
||||
StringRef SegmentName;
|
||||
DataRefImpl DR = Section->getRawDataRefImpl();
|
||||
if (error(MachO->getSectionFinalSegmentName(DR, SegmentName)))
|
||||
SegmentName = "";
|
||||
StringRef SegmentName = MachO->getSectionFinalSegmentName(DR);
|
||||
outs() << SegmentName << ",";
|
||||
}
|
||||
StringRef SectionName;
|
||||
|
Reference in New Issue
Block a user