I have a patch to let DwarfContext defer to lld for getting section contents and relocations.
That is a pretty big performance improvement.
This is just a refactoring to make that easier to do.
This change makes the *creation* of gdb index a dedicated step and makes that templated. That is so that we can uses Elf_Rel in the code.
The change also removes the pubnames and pubtypes later, so that there is an InputSection for them that we can use.
DebugInfo/DebugInfoSec may be ? Sec name has unclear meaning.