mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 16:17:38 +00:00
Implement getRelocationAddress for MachO and ET_REL elf files.
With that, fix the symbolizer to work with any ELF file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205588 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -784,7 +784,15 @@ void MachOObjectFile::moveRelocationNext(DataRefImpl &Rel) const {
|
||||
|
||||
error_code
|
||||
MachOObjectFile::getRelocationAddress(DataRefImpl Rel, uint64_t &Res) const {
|
||||
report_fatal_error("getRelocationAddress not implemented in MachOObjectFile");
|
||||
MachO::any_relocation_info RE = getRelocation(Rel);
|
||||
uint64_t Offset = getAnyRelocationAddress(RE);
|
||||
|
||||
DataRefImpl Sec;
|
||||
Sec.d.a = Rel.d.a;
|
||||
uint64_t SecAddress;
|
||||
getSectionAddress(Sec, SecAddress);
|
||||
Res = SecAddress + Offset;
|
||||
return object_error::success;
|
||||
}
|
||||
|
||||
error_code MachOObjectFile::getRelocationOffset(DataRefImpl Rel,
|
||||
|
||||
Reference in New Issue
Block a user