[PATCH] D59553: [LLD][ELF][DebugInfo] 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 11:11:08 PDT 2019


avl added a comment.

> Is this logically correct? I wonder what is the point of emitting a relocation section pointing to a nonexistent section.

That currently happened with debug info. The relocations put in object file in debug_info section.  At link stage if --gc-sections  specified then unused .text section deleted. But .debug_info  has relocations pointing to the deleted section. linker does not parse debug_info currently so it could not remove unrelated debug_info. If some solution which allow to remove unrelated debug_info would be implemented then things become logically correct. Before this good solution done we can improve debug info reporting using this UINT64_MAX solution.


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

https://reviews.llvm.org/D59553





More information about the llvm-commits mailing list