mirror-llvm-project/lld
Fangrui Song 676d48fb49
[ELF,SPARC] Handle GOTDATA relocations (#213497)
A PIC data reference forms the symbol's GOT offset with
R_SPARC_GOTDATA_OP_HIX22 and R_SPARC_GOTDATA_OP_LOX10 and loads through
it, with R_SPARC_GOTDATA_OP marking the load:

```
sethi %gdop_hix22(sym), %g1
xor   %g1, %gdop_lox10(sym), %g1
ldx   [%l7 + %g1], %g1, %gdop(sym)
```

When the symbol is neither preemptible nor absolute, optimize the load
to `add %l7, %g1, %g1` over the symbol's GOT-relative address. An
absolute symbol keeps the GOT load, as it can be arbitrarily far from
.got and we don't want the X86_64::relaxOpt complexity.

Co-authored-by: Kirill A. Korinsky <kirill@korins.ky>
Co-authored-by: LemonBoy <thatlemon@gmail.com>
Co-authored-by: Alex Rønne Petersen <alex@alexrp.com>
2026-08-01 18:17:35 -07:00
..
cmake/modules [LLD][CMake][MSVC] Install PDBs alongside executables (#126680) 2025-05-23 12:58:30 -07:00
COFF [DTLTO] Overlap temporary file removal (#209423) 2026-07-21 10:53:46 +01:00
Common [ADT] Deprecate StringSwitch Cases with 3+ args. NFC. (#165119) 2025-10-25 19:54:07 -04:00
docs [docs] Rewrite LLD docs to Markdown (#209897) 2026-07-16 20:21:17 +00:00
ELF [ELF,SPARC] Handle GOTDATA relocations (#213497) 2026-08-01 18:17:35 -07:00
include/lld/Common [lld] Report missing --irpgo-profile file instead of asserting (#209028) 2026-07-12 16:28:05 +00:00
MachO [lld][MachO] Avoid quadratic iteration over already-folded symbols during ICF (#213339) 2026-08-01 12:44:24 -07:00
MinGW [LLD] [MinGW] Implement --{push,pop}-state (#197748) 2026-05-15 15:16:20 +03:00
test [ELF,SPARC] Handle GOTDATA relocations (#213497) 2026-08-01 18:17:35 -07:00
tools/lld [CMake] Propagate dependencies to OBJECT libraries in add_llvm_library (re-land) (#184201) 2026-03-02 23:10:15 +02:00
unittests [ELF] Write the output to lld::outs() when -o is - (#209064) 2026-07-12 23:40:56 +00:00
utils [lld][utils] Remove Python2 compatible imports in benchmark.py 2025-10-16 11:14:12 +00:00
wasm [lld][WebAssembly] Fix SharedTagKind in toString (#212385) 2026-07-27 23:37:52 -07:00
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt [CMake] Warn when the version of CMake is older than 3.31.0 (#204203) 2026-06-29 11:16:27 -07:00
LICENSE.TXT
Maintainers.md [lld] update maintainers (#183803) 2026-03-28 22:21:13 -07:00
README.md

LLVM Linker (lld)

This directory and its subdirectories contain source code for the LLVM Linker, a modular cross platform linker which is built as part of the LLVM compiler infrastructure project.

lld is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt.

Benchmarking

In order to make sure various developers can evaluate patches over the same tests, we create a collection of self contained programs.

It is hosted at https://s3-us-west-2.amazonaws.com/linker-tests/lld-speed-test.tar.xz

The current sha256 is 10eec685463d5a8bbf08d77f4ca96282161d396c65bd97dc99dbde644a31610f.