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> |
||
|---|---|---|
| .. | ||
| cmake/modules | ||
| COFF | ||
| Common | ||
| docs | ||
| ELF | ||
| include/lld/Common | ||
| MachO | ||
| MinGW | ||
| test | ||
| tools/lld | ||
| unittests | ||
| utils | ||
| wasm | ||
| .clang-format | ||
| .clang-tidy | ||
| .gitignore | ||
| CMakeLists.txt | ||
| LICENSE.TXT | ||
| Maintainers.md | ||
| 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.