We pay the one-off boilerplate overhead to create *Dumper classes that derive
from objdump::Dumper a la llvm-readobj. This has two primary advantages.
First, a lot object file format specific code can be moved from
llvm-objdump.cpp to *Dump.cpp files. Refactor printPrivateHeaders as
an example.
Second, with the introduction of ELFDumper<ELFT>, we can simplify
a few dispatch functions in ELFDump.cpp.
In addition, the ObjectFile specific dumpers contains a ObjectFile specific
reference so that we can remove a lot of cast<*ObjectFile>(Obj).
(Comment for discussion, not blocking this patch) should ObjDumper be reused by both readobj and objdump - this was prompted by my going to initially suggest - also for a potential future patch - renaming Dumper to something more specific (like ObjDumper) - then realized the name was taken. Or maybe one could be ObjDumper and the other ReadObjDumper?
Anyway, this can go offline on discourse.