[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
Thu Jul 4 23:44:57 PDT 2019


avl added a comment.

In D59553#1570937 <https://reviews.llvm.org/D59553#1570937>, @MaskRay wrote:

> > error: Invalid address range [0xfffffffffffffffe, 0x0000000000000004)
>
> DW_AT_low_pc DW_AT_high_pc pairs like these are less ideal. Before, tools have learned 0 address is special. They may or may not need a special case to handle this. Now, -2 is introduced (whatever value we choose here, GNU linkers still either relocate these to 0 or use their CB_PRETEND logic). They need to learn one more rule.  I still believe, teaching the symbolizers (addr2line, llvm-symbolizer D60470 <https://reviews.llvm.org/D60470>) is the way forward.


the point is in that tools should NOT learn one more rule. There should not be done any additional logic for UINT64_MAX-1 in tools. the fact that llvm-dwarfdump --verify displays error message is probably normal. Because debug info references not existed address range. llvm-dwarfdump --verify dislays errors for current solution also.  The proper way to fix llvm-dwarfdump --verify is to remove broken debug info.


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

https://reviews.llvm.org/D59553





More information about the llvm-commits mailing list