[PATCH] D153602: [DWARF] Adjust warning condition for .dwo sections with relocations
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 23 10:13:10 PDT 2023
MaskRay marked an inline comment as done.
MaskRay added inline comments.
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFContext.cpp:1916
+ if (!Section.relocations().empty() && Name.ends_with(".dwo") &&
+ RelSecName.startswith(".debug")) {
+ HandleWarning(createError("unexpected relocations for dwo section '" +
----------------
HaohaiWen wrote:
> Does dwo file only contains dwo sections? (all dwo sections starts with .debug_). If so, we may not need to check section name.
ELF `.dwo` files also contain `.strtab`.
What this code move tries to address is this: the control flow here doesn't exclude sections such as `.text.dwo` `.rodata.dwo`. `RelSecName.startswith(".debug")` is to exclude them. All of COFF, ELF, and wasm use the `.debug_` prefix.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153602/new/
https://reviews.llvm.org/D153602
More information about the llvm-commits
mailing list