[llvm] [RISCV] Add Vendor Reloc and Fallback Names (PR #116974)
Sam Elliott via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 27 09:51:28 PST 2024
lenary wrote:
Ok, so I guess in that case, if we can land this, downstream you would just comment out some of the `ELF_RELOC(..., ...)` that relate to relocs CHERI has its own names for already in that file. You might also need to xfail the test, but your toolchain wouldn't have a regression for users, I believe.
Once we get `ELF_RISCV_NONSTANDARD_RELOC`, the implementation I have in in `getFixupKind` ignores the vendor field for the moment anyway, and just allows the name to be used in `.reloc` directives (so vendors following the standard need a separate `.reloc ., R_RISCV_VENDOR, ..` directive - I didn't want to change how many relocation `.reloc` creates/encodes). I guess this is when you get a regression for users - because this is the point you might start to see `R_RISCV_CUSTOM<n>` instead of your nice names - but maybe you can just keep the downstream changes from the first paragraph to `ELF_RELOC(..., ...)`?
I can understand not wanting to regress downstream, and it is mostly a CHERI problem that upstream doesn't care about, but maybe with this sketched out, we can proceed on merging this patch upstream?
https://github.com/llvm/llvm-project/pull/116974
More information about the llvm-commits
mailing list