[PATCH] D54282: [DWARFv5] Emit normal type units in .debug_info comdats.

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 9 10:28:23 PST 2018


probinson added inline comments.


================
Comment at: llvm/lib/MC/MCObjectFileInfo.cpp:822
+    return Ctx->getELFSection(
+        DwarfVersion <= 4 ? ".debug_types" : ".debug_info",
+        TT.isMIPS() ? ELF::SHT_MIPS_DWARF : ELF::SHT_PROGBITS,
----------------
dblaikie wrote:
> Seems odd to have a function for "DwarfTypesSection" return the debug_info section. I'd tend towards having MCObjectFileInfo be more literal than this - getDwarfTypesSection(Hash) and getDwarfInfoSection(Hash), etc.
> 
> (a very casual/far-off motivation, is that it'd be great if, eventually, debug_info came to allowing various different entities in comdat'd sections - not just types - this is what some of us have thrown around as "bag of DWARF")
Excellent point, that would be a better division of responsibility.

i've had some discussions with Sony linker people about different tactics for subdividing DWARF, using comdats or other ELF tricks. Cost/benefit tradeoffs have not been clear. But worth pursuing.


Repository:
  rL LLVM

https://reviews.llvm.org/D54282





More information about the llvm-commits mailing list