[PATCH] D45181: [RISCV] Add diff relocation support for RISC-V

Hsiangkai Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 6 00:48:03 PDT 2019


HsiangKai added a comment.

In D45181#1489015 <https://reviews.llvm.org/D45181#1489015>, @rogfer01 wrote:

> In D45181#1488084 <https://reviews.llvm.org/D45181#1488084>, @luismarques wrote:
>
> > @rogfer01 Are you still looking into this? My efforts to fix the problem with the debug information would also touch this. How do you want to proceed?
>
>
> I made some changes in my downstream so things link successfully but I'm still seeing issues with exceptions at runtime. So nothing very useful at the moment for upstream, feel free to make changes here.


I added a flag to MCExpr to decide to resolve the symbol difference or not. If the flag is set, the symbol difference will be resolved even when relaxation is enabled. I upstream the idea to D61584 <https://reviews.llvm.org/D61584>. If it is acceptable to add flags to MCExpr, I think it is a solution for the problem. Any suggestions?

By the way, I also found another problem when dealing with exception handling table. The "call site encoding" is uleb128 by default in LLVM. However, LLVM does not support variable length encoding in symbol difference relocations in current implementation. So, when relaxation is enabled, I think it is simpler to use udata4 as "call site encoding".


Repository:
  rL LLVM

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

https://reviews.llvm.org/D45181





More information about the llvm-commits mailing list