Skip to content

Document Existing Linker Emulation Strings#140

Open
lenary wants to merge 1 commit intoriscv-non-isa:mainfrom
lenary:pr/riscv-emulation-modes
Open

Document Existing Linker Emulation Strings#140
lenary wants to merge 1 commit intoriscv-non-isa:mainfrom
lenary:pr/riscv-emulation-modes

Conversation

@lenary
Copy link
Contributor

@lenary lenary commented Jan 27, 2026

Linkers usually use emulation strings rather than target triples. This documents the existing emula

I have included:

  • The little endian emulation strings: elf32lriscv/elf64lriscv (supported by GNU and Clang/LLD)
  • The big endian emulation strings: elf32briscv/elf64briscv (supported by GNU only at this time)

I have not documented any emulation strings with ABI suffixes, as used by GNU, as Clang/LLD has taken a specific decision not to support these: https://reviews.llvm.org/D95755

If we decide more emulation strings are needed, they can come in a follow-up change.

Linkers usually use emulation strings rather than target triples. This
documents the existing emula

I have included:
- The little endian emulation strings: `elf32lriscv`/`elf64lriscv`
  (supported by GNU and Clang/LLD)
- The big endian emulation strings: `elf32briscv`/`elf64briscv`
  (supported by GNU only at this time)

I have not documented any emulation strings with ABI suffixes, as used by
GNU, as Clang/LLD has taken a specific decision not to support these:
https://reviews.llvm.org/D95755

If we decide more emulation strings are needed, they can come in a
follow-up change.
@apazos
Copy link
Contributor

apazos commented Feb 6, 2026

@lenary, are we introducing GNU-specific elements into the Toolchain Conventions by listing these emulation types? If linkers aren’t required to support them, what is the value in documenting them here?

@lenary
Copy link
Contributor Author

lenary commented Feb 6, 2026

These aren't GNU Specific, as I understand. LLD does support them for naming the emulation (but LLD does not yet have RISC-V Big-endian support)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants