[PATCH] D47901: [WIP] [WebAssembly] Update .debug_line section PC addresses during LEB optimization

Yury Delendik via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 7 15:20:50 PDT 2018


yurydelendik added a comment.

In https://reviews.llvm.org/D47901#1125770, @ruiu wrote:

> It looks like your patch recognizes all DWARF records that contains in-file offsets to adjust them. Is this the right approach? If DWARF is extended (that happens fairly frequently), do you have to make a change to the linker to produce non-broken debug info? If that's the case, I think it is too fragile.


.debug_line uses delta encoding for PC and line/column to reduce amount of used space, otherwise it would need to refer each source code statement/operator by non-relative offset. At worst, it is every wasm operator, and adding relocation records with just increase amount of used space. FWIW, The algorithm just fixed "delta" encoded values and cannot be simplified.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D47901





More information about the llvm-commits mailing list