[lld] [llvm] Add initial support for Xtensa to LLD (PR #202926)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 22:58:08 PDT 2026


MaskRay wrote:

Please add a PR description, and please start an RFC on Discourse before this goes further. Adding a new architecture to lld/ELF is a project-level commitment, not just a new `Arch/*.cpp` file. 

Please also split this into: (1) the new Xtensa.def relocation numbers (2) lld changes

- Is there a published Xtensa ELF psABI (relocations, e_flags, ABI variants), or is the de-facto spec "whatever bfd/elf32-xtensa.c does"? Specifically, what defines R_XTENSA_32's addend semantics — the patch adds in-place contents to the RELA addend because GNU as and the LLVM backend disagree.
- Which object producers must lld consume? LLVM-produced objects only, or also GNU Assembler output?
- Since the backend is experimental, `REQUIRES: xtensa` tests won't run in default builds. Who maintains this code, and will there be a buildbot with LLVM_EXPERIMENTAL_TARGETS_TO_BUILD=Xtensa?
- Is there GOT/PLT/TLS/linker relaxation planned?

https://github.com/llvm/llvm-project/pull/202926


More information about the llvm-commits mailing list