llvm-capstone/lld
Fangrui Song 38ed1db7e8 [ELF] Support non-RAX/non-adjacent R_X86_64_GOTPC32_TLSDESC/R_X86_64_TLSDESC_CALL
The current TLSDESC optimization code assumes:
```
leaq x@tlsdesc(%rip), %rax
call *x@tlscall(%rax)       # adjacent
```

From https://gitlab.freedesktop.org/mesa/mesa/-/issues/5665 , it seems that the
two instructions may not be adjacent in GCC 10's output:
```
leaq x@tlsdesc(%rip), %rax
something else
call *x@tlscall(%rax)
```

This patch supports the case. While here, support non-RAX registers for
R_X86_64_GOTPC32_TLSDESC, in case the compiler generates inefficient:

```
leaq x@tlsdesc(%rip), %rcx  # or %rdx, %rbx, %rdi, ...
movq %rcx, %rax
call *x@tlscall(%rax)       # GNU ld/gold error for non-RAX
```

Differential Revision: https://reviews.llvm.org/D114416
2021-11-23 10:30:11 -08:00
..
cmake/modules [cmake] Add support for multiple distributions 2021-05-12 11:13:18 -07:00
COFF [LLD] [COFF] Omit section symbols and IMAGE_SYM_CLASS_LABEL from the PE symbol table 2021-11-23 10:17:04 +02:00
Common [lld/mac] Write -v output to stderr 2021-11-02 13:59:14 -04:00
docs [ELF] Support non-RAX/non-adjacent R_X86_64_GOTPC32_TLSDESC/R_X86_64_TLSDESC_CALL 2021-11-23 10:30:11 -08:00
ELF [ELF] Support non-RAX/non-adjacent R_X86_64_GOTPC32_TLSDESC/R_X86_64_TLSDESC_CALL 2021-11-23 10:30:11 -08:00
include/lld [lld/mac] Write -v output to stderr 2021-11-02 13:59:14 -04:00
lib [NFC][lld] Inclusive language: change master file to merged file 2021-11-15 14:32:09 -06:00
MachO [MachO] Fix struct size assertion 2021-11-22 15:02:30 -08:00
MinGW [LLD] [MinGW] Add more options for disabling flags in the executable 2021-08-12 13:27:09 +03:00
test [ELF] Support non-RAX/non-adjacent R_X86_64_GOTPC32_TLSDESC/R_X86_64_TLSDESC_CALL 2021-11-23 10:30:11 -08:00
tools/lld [lld] Enable ANSI escape code for Windows 2021-09-09 16:51:11 -07:00
unittests [CMake][gn] lldMachO=>lldMachOOld, lldMachO2=>lldMachO 2021-08-04 18:52:41 -07:00
utils
wasm [NFC] Inclusive language: Remove instances of master in URLs 2021-11-05 08:48:41 -05:00
.clang-format
.clang-tidy NFC: .clang-tidy: Inherit configs from parents to improve maintainability 2021-06-08 08:25:59 -07:00
.gitignore
CMakeLists.txt [LLVM][CMake][NFC] Resolve FIXME: Rename LLVM_CMAKE_PATH to LLVM_CMAKE_DIR throughout the project 2021-09-16 18:29:57 +02:00
CODE_OWNERS.TXT Add code owners of new MachO port 2020-09-02 19:32:12 -07:00
LICENSE.TXT
README.md [doc] Place sha256 in lld/README.md into backticks 2021-01-12 10:19:40 -08:00

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.