[PATCH] D82838: Parse section ranges when verifying DWARF so we can exclude addresses that should have been stripped from DWARF.
Greg Clayton via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 30 12:29:22 PDT 2020
clayborg added a comment.
In D82838#2122054 <https://reviews.llvm.org/D82838#2122054>, @jhenderson wrote:
> I'm probably not best-placed to review this, as I haven't really used the verifier in practice, partly because of the exact problem this is trying to solve. In principle, I quite like not needing to use specific tombstone values here, but I wonder whether a "dead" range that isn't a tombstone value should itself be a verification failure, regardless of where it ends up?
Can you give an example of what you are saying above? We can easily ignore tombstone values (-1, -2) in addition to what we are doing here. Zero is more problematic and more common from what I have seen, and that is what this patch really helps weed out. At address zero in a ELF file is right at the ELF header, so not many shared libraries actually have functions with a virtual address of zero from what I have seen.
> Another point: there can be dead data too, and this approach shouldn't be text specific. After all, you can have -fdata-sections leading to discarded data via --gc-sections just as easily as dead text sections from -ffunction-sections.
This is definitely possible. I don't think we do any verification on data right now since there isn't much we can do other than emit a warning that the DIE should have been stripped.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82838/new/
https://reviews.llvm.org/D82838
More information about the llvm-commits
mailing list