[PATCH] D89216: [dsymutil] Add the ability to run the DWARF verifier on the input
Greg Clayton via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 22 14:05:22 PDT 2020
clayborg added a comment.
I really like this patch as it will make detecting LTO issues easier as there are often issues in the incoming .o files.
One thing to think about is we want to only verify unique object files one time. In older LTO based code I remember seeing that same "lto.o" file in the debug map multiple time with many different sources file (N_SO) entries with the same path to the same .o file (N_OSO). If this would happen, would this patch end up running the verifier on the same file over and over?
================
Comment at: llvm/tools/dsymutil/BinaryHolder.cpp:274
+ std::unique_ptr<DWARFContext> DICtx = DWARFContext::create(*Object);
+ if (!DICtx->verify(OS, DumpOpts.noImplicitRecursion()))
+ WithColor::warning() << "input verification failed for "
----------------
I believe that detection of overlapping address ranges is disabled or .o files since it is known to have unrelocated addresses.
================
Comment at: llvm/tools/dsymutil/Options.td:45
+def: Joined<["--", "-"], "verify-dwarf=">, Alias<verify_dwarf>;
+
def no_output: F<"no-output">,
----------------
If we aren't going to have these errors be fatal, can we possibly add an option that _can_ make verification errors cause it to be?
```
--verify-errors-fatal
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89216/new/
https://reviews.llvm.org/D89216
More information about the llvm-commits
mailing list