mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-18 11:24:01 +00:00
Add a SymbolicFile interface between Binary and ObjectFile.
This interface allows IRObjectFile to be implemented without having dummy methods for all section and segment related methods. Both llvm-ar and llvm-nm are changed to use it. Unfortunately the mangler is still not plugged in since it requires some refactoring to make a Module hold a DataLayout. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201881 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -549,17 +549,17 @@ COFFObjectFile::COFFObjectFile(MemoryBuffer *Object, error_code &EC,
|
||||
EC = object_error::success;
|
||||
}
|
||||
|
||||
symbol_iterator COFFObjectFile::symbol_begin() const {
|
||||
basic_symbol_iterator COFFObjectFile::symbol_begin_impl() const {
|
||||
DataRefImpl Ret;
|
||||
Ret.p = reinterpret_cast<uintptr_t>(SymbolTable);
|
||||
return symbol_iterator(SymbolRef(Ret, this));
|
||||
return basic_symbol_iterator(SymbolRef(Ret, this));
|
||||
}
|
||||
|
||||
symbol_iterator COFFObjectFile::symbol_end() const {
|
||||
basic_symbol_iterator COFFObjectFile::symbol_end_impl() const {
|
||||
// The symbol table ends where the string table begins.
|
||||
DataRefImpl Ret;
|
||||
Ret.p = reinterpret_cast<uintptr_t>(StringTable);
|
||||
return symbol_iterator(SymbolRef(Ret, this));
|
||||
return basic_symbol_iterator(SymbolRef(Ret, this));
|
||||
}
|
||||
|
||||
library_iterator COFFObjectFile::needed_library_begin() const {
|
||||
@ -832,8 +832,8 @@ const coff_symbol *COFFObjectFile::getCOFFSymbol(symbol_iterator &It) const {
|
||||
return toSymb(It->getRawDataRefImpl());
|
||||
}
|
||||
|
||||
const coff_relocation *COFFObjectFile::getCOFFRelocation(
|
||||
relocation_iterator &It) const {
|
||||
const coff_relocation *
|
||||
COFFObjectFile::getCOFFRelocation(relocation_iterator &It) const {
|
||||
return toRel(It->getRawDataRefImpl());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user