mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 21:24:00 +00:00
Make getRelocationSection MachO only.
There are 3 types of relocations on MachO * Scattered * Section based * Symbol based On ELF and COFF relocations are symbol based. We were in the strange situation that we abstracted over two of them. This makes section based relocations MachO only. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240149 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -991,19 +991,6 @@ symbol_iterator COFFObjectFile::getRelocationSymbol(DataRefImpl Rel) const {
|
||||
return symbol_iterator(SymbolRef(Ref, this));
|
||||
}
|
||||
|
||||
section_iterator COFFObjectFile::getRelocationSection(DataRefImpl Rel) const {
|
||||
symbol_iterator Sym = getRelocationSymbol(Rel);
|
||||
if (Sym == symbol_end())
|
||||
return section_end();
|
||||
COFFSymbolRef Symb = getCOFFSymbol(*Sym);
|
||||
if (!Symb.isSection())
|
||||
return section_end();
|
||||
section_iterator Res(section_end());
|
||||
if (getSymbolSection(Sym->getRawDataRefImpl(),Res))
|
||||
return section_end();
|
||||
return Res;
|
||||
}
|
||||
|
||||
std::error_code COFFObjectFile::getRelocationType(DataRefImpl Rel,
|
||||
uint64_t &Res) const {
|
||||
const coff_relocation* R = toRel(Rel);
|
||||
|
Reference in New Issue
Block a user