[PATCH] D59553: [LLD][ELF][DebugInfo] llvm-symbolizer shows incorrect source line info if --gc-sections used

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 22 04:10:38 PDT 2019


grimar added inline comments.


================
Comment at: lld/test/ELF/gc-sections-debuginfo.s:34
+# CHECK-NEXT: SectionData (
+# CHECK64-NEXT:   0000: FEFFFFFF FFFFFFFF                    |
+# CHECK32-NEXT:   0000: FEFFFFFF                     |
----------------
grimar wrote:
> probinson wrote:
> > jhenderson wrote:
> > > grimar wrote:
> > > > Please remove the spaces after `...FFF` and `|` symbol, no need to test we print it here.
> > > It's worth noting that unless you are using FileCheck's --strict-whitespace, then all contiguous runs of whitespace, both in the pattern and the output, are treated as a single space, so this extra spacing has no effect currently either. If you want to be sure that the number ends when it does, with not output afterwards, you can also do something like `FFFF{{ }}` or `FFFF{{$}}` which will check that a space or end of line respectively follows immediately.
> > I disagree. Certainly for the 32-bit case we want to show that there is only a 32-bit value, and to do that we must check for something after the value. For consistency doing the same for the 64-bit case is appropriate.
> I think in the given case when we just have `.long`/`.quad` relocation in the inputs we perhaps do not need any additional testing. We actually care only about first 4/8 bytes of the section and their value.
> 
> For clarity, we might add a check for the section Size field perhaps though.
> 
Testing of the `Size` field of the section should work for this purpose.
(I think it is the best way to know how much data section contains).


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

https://reviews.llvm.org/D59553





More information about the llvm-commits mailing list