diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/DebugInfo/DWARFContext.cpp | 2 | ||||
-rw-r--r-- | lib/Object/COFFObjectFile.cpp | 3 | ||||
-rw-r--r-- | lib/Object/MachOObjectFile.cpp | 16 |
3 files changed, 3 insertions, 18 deletions
diff --git a/lib/DebugInfo/DWARFContext.cpp b/lib/DebugInfo/DWARFContext.cpp index 1e13731361..e5daf55982 100644 --- a/lib/DebugInfo/DWARFContext.cpp +++ b/lib/DebugInfo/DWARFContext.cpp @@ -572,7 +572,7 @@ DWARFContextInMemory::DWARFContextInMemory(object::ObjectFile *Obj) : reloc_e = i->end_relocations(); reloc_i != reloc_e; reloc_i.increment(ec)) { uint64_t Address; - reloc_i->getAddress(Address); + reloc_i->getOffset(Address); uint64_t Type; reloc_i->getType(Type); uint64_t SymAddr = 0; diff --git a/lib/Object/COFFObjectFile.cpp b/lib/Object/COFFObjectFile.cpp index 46acd4d537..70fec321ba 100644 --- a/lib/Object/COFFObjectFile.cpp +++ b/lib/Object/COFFObjectFile.cpp @@ -705,8 +705,7 @@ error_code COFFObjectFile::getRelocationNext(DataRefImpl Rel, } error_code COFFObjectFile::getRelocationAddress(DataRefImpl Rel, uint64_t &Res) const { - Res = toRel(Rel)->VirtualAddress; - return object_error::success; + report_fatal_error("getRelocationAddress not implemented in COFFObjectFile"); } error_code COFFObjectFile::getRelocationOffset(DataRefImpl Rel, uint64_t &Res) const { diff --git a/lib/Object/MachOObjectFile.cpp b/lib/Object/MachOObjectFile.cpp index 51cd5b9a95..14bca2bf90 100644 --- a/lib/Object/MachOObjectFile.cpp +++ b/lib/Object/MachOObjectFile.cpp @@ -789,21 +789,7 @@ MachOObjectFile::getSectionRelEnd(DataRefImpl Sec) const { error_code MachOObjectFile::getRelocationAddress(DataRefImpl Rel, uint64_t &Res) const { - uint64_t SectAddress; - DataRefImpl Sec; - Sec.d.a = Rel.d.b; - if (is64Bit()) { - macho::Section64 Sect = getSection64(Sec); - SectAddress = Sect.Address; - } else { - macho::Section Sect = getSection(Sec); - SectAddress = Sect.Address; - } - - macho::RelocationEntry RE = getRelocation(Rel); - uint64_t RelAddr = getAnyRelocationAddress(RE); - Res = SectAddress + RelAddr; - return object_error::success; + report_fatal_error("getRelocationAddress not implemented in MachOObjectFile"); } error_code MachOObjectFile::getRelocationOffset(DataRefImpl Rel, |