mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Do the same fix as r149667, but for the Mach-O disassembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149674 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -418,8 +418,11 @@ void llvm::DisassembleInputMachO(StringRef Filename) {
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Start at the address of the symbol relative to the section's address.
|
// Start at the address of the symbol relative to the section's address.
|
||||||
|
uint64_t SectionAddress = 0;
|
||||||
uint64_t Start = 0;
|
uint64_t Start = 0;
|
||||||
|
Sections[SectIdx].getAddress(SectionAddress);
|
||||||
Symbols[SymIdx].getAddress(Start);
|
Symbols[SymIdx].getAddress(Start);
|
||||||
|
Start -= SectionAddress;
|
||||||
|
|
||||||
// Stop disassembling either at the beginning of the next symbol or at
|
// Stop disassembling either at the beginning of the next symbol or at
|
||||||
// the end of the section.
|
// the end of the section.
|
||||||
@ -433,6 +436,7 @@ void llvm::DisassembleInputMachO(StringRef Filename) {
|
|||||||
Sections[SectIdx].containsSymbol(Symbols[NextSymIdx],
|
Sections[SectIdx].containsSymbol(Symbols[NextSymIdx],
|
||||||
containsNextSym);
|
containsNextSym);
|
||||||
Symbols[NextSymIdx].getAddress(NextSym);
|
Symbols[NextSymIdx].getAddress(NextSym);
|
||||||
|
NextSym -= SectionAddress;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
++NextSymIdx;
|
++NextSymIdx;
|
||||||
|
Reference in New Issue
Block a user