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

Alexey Lapshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 20 06:51:45 PDT 2019


avl marked an inline comment as done.
avl 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:
> jhenderson wrote:
> > 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.
> This function is called for non-alloc sections only (i.e. debug ones). So, we should be fine I think.
without checking for "debug_" prefix several tests failed. I will look at them more accurate to see whether they failed correctly. 


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

https://reviews.llvm.org/D59553





More information about the llvm-commits mailing list