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

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 21 14:25:49 PDT 2019


ruiu added a comment.

Looks like the test files are huge. I order to test this functionality alone, you don't need a small file containing one relocation pointing to a to-be-discarded section. You don't really have to test it against actual data.



================
Comment at: lld/ELF/InputSection.cpp:839
+      // then - it is neccessary to make start offset to be out of
+      // module address range to not to overlap with module`s ranges.
+      // UINT64_MAX-1 used as maximal value of an address. UINT64_MAX has
----------------
ruiu wrote:
> ` -> '
Please use apostrophe instead of backquote.


================
Comment at: lld/ELF/InputSection.cpp:836
+      // If relocation points to the deleted section (-Wl,--gc-sections)
+      // then -> it is neccessary to make start offset to be out of
+      // module address range to not to overlap with module`s ranges.
----------------
nit:

"If relocation points to the deleted section (-Wl,--gc-sections) then -> it is necessary"

"If relocation points to the deleted section (-Wl,--gc-sections), then it is necessary ..."



================
Comment at: lld/ELF/InputSection.cpp:841
+      // https://bugs.llvm.org/show_bug.cgi?id=41124
+      Target->relocateOne(BufLoc, Type, SignExtend64<Bits>(0xfffffffffffffffeULL));
   }
----------------
No need to sign-extend because this 64-bit value will never be sign-extended.


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

https://reviews.llvm.org/D59553





More information about the llvm-commits mailing list