llvm/lld
Nico Weber 10cda6e36c [lld/mac] Give range extension thunks for local symbols local visibility
When two local symbols (think: file-scope static functions, or functions in
unnamed namespaces) with the same name in two different translation units
both needed thunks, ld64.lld previously created external thunks for both
of them. These thunks ended up with the same name, leading to a duplicate
symbol error for the thunk symbols.

Instead, give thunks for local symbols local visibility.

(Hitting this requires a jump to a local symbol from over 128 MiB away.
It's unlikely that a single .o file is 128 MiB large, but with ICF
you can end up with a situation where the local symbol is ICF'd with
a symbol in a separate translation unit. And that can introduce a
large enough jump to require a thunk.)

Fixes PR54599.

Differential Revision: https://reviews.llvm.org/D122624
2022-03-30 16:45:05 -04:00
..
cmake/modules [CMake] Factor out config prefix finding logic 2022-01-07 20:16:18 +00:00
COFF [Option] Avoid using the default argument for the 3-argument hasFlag. NFC 2022-03-26 00:57:06 -07:00
Common Cleanup codegen includes 2022-03-16 08:43:00 +01:00
docs [ELF] Default to --no-fortran-common 2022-03-30 09:12:09 -07:00
ELF [ELF] Default to --no-fortran-common 2022-03-30 09:12:09 -07:00
include/lld [lld] Make error handling functions opaque 2022-02-17 11:54:57 -08:00
MachO [lld/mac] Give range extension thunks for local symbols local visibility 2022-03-30 16:45:05 -04:00
MinGW [LLD][MinGW] Add --heap argument support 2022-01-30 00:01:45 +02:00
test [lld/mac] Give range extension thunks for local symbols local visibility 2022-03-30 16:45:05 -04:00
tools/lld [LLD] Fix issue in HIP due to unspecified order of evaluation of the function object 2022-02-08 19:12:15 -05:00
utils
wasm [lld][WebAssembly] Fix crash accessing non-live __tls_base symbol 2022-03-17 13:59:45 -07:00
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt [lld] Require C++14 in LLD standalone build 2022-02-22 18:15:29 -05:00
CODE_OWNERS.TXT
LICENSE.TXT
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.