[PATCH] D122490: [RISCV] Generate EF_RISCV_RVC when .option rvc

Luís Marques via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 28 02:50:32 PDT 2022


luismarques added a comment.

This seems to match the GNU behavior, so in that sense it's good.

What about the attributes? I thought that the attributes were basically a more flexible and extensible version of the `Flags`. But with this behavior we get RVC in `Flags` but not in `Tag_RISCV_arch`. That seems a bit confusing and maybe error-prone, although it does also match the GNU behavior.

I'm not even sure in what cases this matters. `Flags` is documented as being "used by the linker to disallow linking ELF files with incompatible ABIs together" but C and non-C are always compatible with each other, assuming the target does support C.

To be clear, if no one else has any opinion about this I think I'd still be in favor of merging this, as we would match the GNU tools and I don't see much downside, but this seems like a weird and non-ideal corner case, whichever way we slice it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122490



More information about the llvm-commits mailing list