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

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 20 03:20:38 PDT 2019


jhenderson added inline comments.


================
Comment at: lld/ELF/InputSection.cpp:813
+    uint64_t OutOfModuleOffset = 0;
+    if (!Config->Relocatable && !Sym.getOutputSection() && Name.startswith(".debug_"))
+      OutOfModuleOffset = Out::ModuleHighPC;
----------------
grimar wrote:
> I do not think this method can be called when `Config->Relocatable` actually?
> Also checking the symbol name is very hacky, I would remove it.
> 
Be careful with references to weak undefined symbols. We don't want to patch those to an invalid address by accident, so this should only affect patching of .debug* sections, I think.


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

https://reviews.llvm.org/D59553





More information about the llvm-commits mailing list