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

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 29 02:56:41 PDT 2019


jhenderson added inline comments.


================
Comment at: lld/ELF/InputSection.cpp:835
+    else
+      // If the relocation points to a deleted section (--gc-sections),
+      // then it is neccessary to make the start offset be outside the
----------------
Sorry, one more comment here, now that I read it again. Change:
"... (--gc-sections) ..." to ", e.g. due to --gc-sections,"

COMDATs are removed even without --gc-sections, for example.


================
Comment at: lld/test/ELF/gc-sections-debuginfo.s:4
+# RUN: echo '.section .text,"a"; .byte 0;  .section .debug_foo,"", at progbits; .quad .text' \
+# RUN: | llvm-mc --filetype=obj --arch=x86-64 - -o %t
+# RUN: ld.lld %t -o %t2 --gc-sections
----------------
grimar wrote:
> avl wrote:
> > jhenderson wrote:
> > > Could you indent this like you were before, please? Same below.
> > I did not get it. What exactly should be done ? 
> > 
> > this :
> > 
> > # RUN: echo '.section .text,"a"; .byte 0;  .section .debug_foo,"", at progbits; .quad .text' \
> > # RUN: | llvm-mc --filetype=obj --arch=x86-64 - -o %t
> > 
> > should be change into this ?
> > 
> > # RUN: echo '.section .text,"a"; .byte 0;  .section .debug_foo,"", at progbits; .quad .text'  | \
> > # RUN: llvm-mc --filetype=obj --arch=x86-64 - -o %t
> I think James wanted you to add a double space (identation) before `llvm-mc`:
> 
> ```
> # RUN: echo '.section .text,"a"; .byte 0;  .section .debug_foo,"", at progbits; .quad .text' \
> # RUN:   | llvm-mc --filetype=obj --arch=x86-64 - -o %t
> ```
Yes, exactly this. It makes it a little easier to read this as a continuation.


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

https://reviews.llvm.org/D59553





More information about the llvm-commits mailing list