[all-commits] [llvm/llvm-project] 0a44c3: [lld] Add target support for SystemZ (s390x) (#75643)
Ulrich Weigand via All-commits
all-commits at lists.llvm.org
Fri Feb 16 05:18:18 PST 2024
Branch: refs/heads/release/18.x
Home: https://github.com/llvm/llvm-project
Commit: 0a44c3792a6ff799df5f100670d7e19d1bc49f03
https://github.com/llvm/llvm-project/commit/0a44c3792a6ff799df5f100670d7e19d1bc49f03
Author: Ulrich Weigand <ulrich.weigand at de.ibm.com>
Date: 2024-02-16 (Fri, 16 Feb 2024)
Changed paths:
A lld/ELF/Arch/SystemZ.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/SyntheticSections.cpp
M lld/ELF/Target.cpp
M lld/ELF/Target.h
A lld/test/ELF/Inputs/systemz-init.s
A lld/test/ELF/basic-systemz.s
A lld/test/ELF/emulation-systemz.s
A lld/test/ELF/lto/systemz.ll
A lld/test/ELF/systemz-got.s
A lld/test/ELF/systemz-gotent-relax-align.s
A lld/test/ELF/systemz-gotent-relax-und-dso.s
A lld/test/ELF/systemz-gotent-relax.s
A lld/test/ELF/systemz-ifunc-nonpreemptible.s
A lld/test/ELF/systemz-init-padding.s
A lld/test/ELF/systemz-pie.s
A lld/test/ELF/systemz-plt.s
A lld/test/ELF/systemz-reloc-abs.s
A lld/test/ELF/systemz-reloc-disp12.s
A lld/test/ELF/systemz-reloc-disp20.s
A lld/test/ELF/systemz-reloc-got.s
A lld/test/ELF/systemz-reloc-gotrel.s
A lld/test/ELF/systemz-reloc-pc16.s
A lld/test/ELF/systemz-reloc-pc32.s
A lld/test/ELF/systemz-reloc-pcdbl.s
A lld/test/ELF/systemz-tls-gd.s
A lld/test/ELF/systemz-tls-ie.s
A lld/test/ELF/systemz-tls-ld.s
A lld/test/ELF/systemz-tls-le.s
M lld/test/lit.cfg.py
Log Message:
-----------
[lld] Add target support for SystemZ (s390x) (#75643)
This patch adds full support for linking SystemZ (ELF s390x) object
files. Support should be generally complete:
- All relocation types are supported.
- Full shared library support (DYNAMIC, GOT, PLT, ifunc).
- Relaxation of TLS and GOT relocations where appropriate.
- Platform-specific test cases.
In addition to new platform code and the obvious changes, there were a
few additional changes to common code:
- Add three new RelExpr members (R_GOTPLT_OFF, R_GOTPLT_PC, and
R_PLT_GOTREL) needed to support certain s390x relocations. I chose not
to use a platform-specific name since nothing in the definition of these
relocs is actually platform-specific; it is well possible that other
platforms will need the same.
- A couple of tweaks to TLS relocation handling, as the particular
semantics of the s390x versions differ slightly. See comments in the
code.
This was tested by building and testing >1500 Fedora packages, with only
a handful of failures; as these also have issues when building with LLD
on other architectures, they seem unrelated.
Co-authored-by: Tulio Magno Quites Machado Filho <tuliom at redhat.com>
(cherry picked from commit fe3406e349884e4ef61480dd0607f1e237102c74)
More information about the All-commits
mailing list