[PATCH] D106624: [WIP][DWARF] Don't process .debug_info relocations for DWO Context

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 23 13:53:15 PDT 2021


dblaikie added a comment.

> If relocations for that exist then sure we should apply them (is that even a thing?)

No, relocations don't exist for dwo sections (if there are any relocations for dwo sections, that's a bug in the producer) - so skipping all relocation application for .dwo sections is fine/correct (could error out if there are relocation sections for dwo sections, though, if you like - but probably should do that in a separate patch).



================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFContext.cpp:1739
+      if (RelocatedSection == Obj.section_end() ||
+          (IsDWOContext && !Name.contains(".dwo")))
         continue;
----------------
dblaikie wrote:
> How come this tests both these properties? I guess there's some case where `IsDWOContext` is inadequate/isn't correct and the file extension test is needed? What's that case?
Still curious about this.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106624/new/

https://reviews.llvm.org/D106624



More information about the llvm-commits mailing list