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.
llvm-svn: 240149
diff --git a/llvm/tools/llvm-readobj/MachODumper.cpp b/llvm/tools/llvm-readobj/MachODumper.cpp
index 9017350..aeb563a 100644
--- a/llvm/tools/llvm-readobj/MachODumper.cpp
+++ b/llvm/tools/llvm-readobj/MachODumper.cpp
@@ -479,7 +479,7 @@
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;