[all-commits] [llvm/llvm-project] 6084ee: [lld][ELF] Support LoongArch

WÁNG Xuěruì via All-commits all-commits at lists.llvm.org
Tue Jul 25 02:11:13 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6084ee742064cf8121444febee342133b0cb7abd
      https://github.com/llvm/llvm-project/commit/6084ee742064cf8121444febee342133b0cb7abd
  Author: WANG Xuerui <git at xen0n.name>
  Date:   2023-07-25 (Tue, 25 Jul 2023)

  Changed paths:
    A lld/ELF/Arch/LoongArch.cpp
    M lld/ELF/CMakeLists.txt
    M lld/ELF/Driver.cpp
    M lld/ELF/InputFiles.cpp
    M lld/ELF/InputSection.cpp
    M lld/ELF/Relocations.cpp
    M lld/ELF/Relocations.h
    M lld/ELF/ScriptParser.cpp
    M lld/ELF/Target.cpp
    M lld/ELF/Target.h
    M lld/docs/ReleaseNotes.rst
    M lld/docs/index.rst
    M lld/docs/ld.lld.1
    A lld/test/ELF/emulation-loongarch.s
    A lld/test/ELF/loongarch-abs64.s
    A lld/test/ELF/loongarch-add-sub.s
    A lld/test/ELF/loongarch-branch.s
    A lld/test/ELF/loongarch-interlink.test
    A lld/test/ELF/loongarch-pc-aligned.s
    A lld/test/ELF/loongarch-pcala-lo12-jirl-shared.s
    A lld/test/ELF/loongarch-pcala-lo12-jirl.s
    A lld/test/ELF/loongarch-plt.s
    A lld/test/ELF/loongarch-reloc-pic.s
    A lld/test/ELF/loongarch-tls-gd-edge-case.s
    A lld/test/ELF/loongarch-tls-gd.s
    A lld/test/ELF/loongarch-tls-ie.s
    A lld/test/ELF/loongarch-tls-ld.s
    A lld/test/ELF/loongarch-tls-le.s
    M lld/test/lit.cfg.py

  Log Message:
  -----------
  [lld][ELF] Support LoongArch

This adds support for the LoongArch ELF psABI v2.00 [1] relocation
model to LLD. The deprecated stack-machine-based psABI v1 relocs are not
supported.

The code is tested by successfully bootstrapping a Gentoo/LoongArch
stage3, complete with common GNU userland tools and both the LLVM and
GNU toolchains (GNU toolchain is present only for building glibc,
LLVM+Clang+LLD are used for the rest). Large programs like QEMU are
tested to work as well.

[1]: https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-EN.html

Reviewed By: MaskRay, SixWeining

Differential Revision: https://reviews.llvm.org/D138135




More information about the All-commits mailing list