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:
Rafael Espindola
2015-06-19 17:54:28 +00:00
parent 260366437c
commit 776f86420e
7 changed files with 9 additions and 39 deletions

View File

@@ -479,7 +479,7 @@ void MachODumper::printRelocation(const MachOObjectFile *Obj,
return;
}
} else if (!IsScattered) {
section_iterator SecI = Reloc.getSection();
section_iterator SecI = Obj->getRelocationSection(DR);
if (SecI != Obj->section_end()) {
if (error(SecI->getName(TargetName)))
return;