[PATCH] D49446: [WebAssembly] Move .debug_line section address of dead function outside section range

Yury Delendik via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 18 11:13:20 PDT 2018


yurydelendik added a comment.

> I believe for other architectures, when the linker emits debug info for a dead function, it treats relocations pointing a dead section as if it were pointing to address zero. Is there any reason to do that differnetly for wasm?

The .debug_line section encodes instructions offset in relative form, so the next address advances by delta, and that introduces non-zero addresses for dead code. It is hard to tell if an address that is close to 0 points to dead section or just to the beginning of the code (unless you have relocation sections handy). It will make consumption of the debug information way easier if dead pointers will not point to the same locations where live data can reside.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D49446





More information about the llvm-commits mailing list