This was causing a crash as we were attempting to look up the
nonexistent parent OutputSection of the debug sections. We didn't detect
it earlier because there was no test for PIEs with debug info (PIEs
require us to emit rebases for X86_64_RELOC_UNSIGNED).
This diff filters out the debug sections while loading the ObjFiles. In
addition to fixing the above problem, it also lets us avoid doing
redundant work -- we no longer parse / apply relocations / attempt to
emit dyld opcodes for these sections that we don't emit.
Fixes llvm.org/PR48392.
I would find a comment here helpful why these are the isDebugSection sections that get a DwarfObject. It's not obvious to me why __debug_line and __debug_ranges aren't listed here (or why we do any filtering at all). I don't know much debug information and I can believe that it's obvious to domain experts :)