[PATCH] D159082: [ELF][RISCV] Implement --emit-relocs with relaxation

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 12 15:37:57 PDT 2023


MaskRay added a comment.

In D159082#4641639 <https://reviews.llvm.org/D159082#4641639>, @jobnoorman wrote:

> In D159082#4641491 <https://reviews.llvm.org/D159082#4641491>, @MaskRay wrote:
>
>> Opening an https://sourceware.org/ issue is useful but I do believe R_RISCV_RELAX=>R_RISCV_NONE on our side is unnecessary.
>
> Agreed.
>
>> --emit-relocs is a debug or advanced feature. Giving more information by preserving the original type has some value. The R_RISCV_RELAX=>R_RISCV_NONE write is unneeded complexity, albeit small.
>
> I assume you meant `R_RISCV_ALIGN` => `R_RISCV_NONE` here? I've reverted the patch to its former behavior (emitting `R_RISCV_ALIGN`) in any case.

I filed https://sourceware.org/bugzilla/show_bug.cgi?id=30844 (`ld riscv: --emit-relocs does not retain the original relocation type`).
I am quite concerned if RISC-V `--emit-relocs` get more uses before we have figured out the issues.
Please consider that the current lld behavior is highly experimental and don't rely on the behavior in some components like bolt/ (or consider its code highly experimental and may break any time).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D159082



More information about the llvm-commits mailing list