[PATCH] D79962: Fix the verification of DIEs with DW_AT_ranges.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 15 01:35:44 PDT 2020


jhenderson added inline comments.


================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp:420
+      // more dead stripped address ranges which tend to all be at the same
+      // address: 0 or -1.
+      if (auto PrevRange = RI.insert(Range)) {
----------------
clayborg wrote:
> dblaikie wrote:
> > Where have you seen -1? Both gold and lld use 0, binutils ld... is more complicated, but I don't think it uses -1? hmm, maybe it does... hmm, at least for ranges it uses 1:  [0x0000000000000001, 0x0000000000000001) which is different from gold and lld but for the address it uses zero:
> > 
> >                 DW_AT_low_pc    (0x0000000000000000)
> >                 DW_AT_high_pc   (0x0000000000000006)
> > 
> > 
> I believe Paul Robinson stated that the Sony linker does this. Paul did I remember correctly?
Not got time to do a full review myself today, but just chiming in to confirm that the Sony linker patches low_pc to -1 for stripped stuff in .debug_info and .debug_aranges. For .debug_ranges we actually use -2/-2 pairs because -1 is a special value in that section.

I vaguely recall that there was some discussion on the mailing list about this a couple of years ago, and that there may be some other users of this approach too.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79962





More information about the llvm-commits mailing list