mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-30 22:18:46 +00:00
Add RelocVisitor support for MachO
This commit adds partial support for MachO relocations to RelocVisitor. A simple test case is added to show that relocations are indeed being applied and that using llvm-dwarfdump on MachO files no longer errors. Correctness is not yet tested, due to an unrelated bug in DebugInfo, which will be fixed with appropriate testcase in a followup commit. Differential Revision: http://reviews.llvm.org/D8148 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238663 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1004,6 +1004,11 @@ std::error_code MachOObjectFile::getRelocationHidden(DataRefImpl Rel,
|
||||
return object_error::success;
|
||||
}
|
||||
|
||||
uint8_t MachOObjectFile::getRelocationLength(DataRefImpl Rel) const {
|
||||
MachO::any_relocation_info RE = getRelocation(Rel);
|
||||
return getAnyRelocationLength(RE);
|
||||
}
|
||||
|
||||
//
|
||||
// guessLibraryShortName() is passed a name of a dynamic library and returns a
|
||||
// guess on what the short name is. Then name is returned as a substring of the
|
||||
|
Reference in New Issue
Block a user