commit | 67b39ebf92e4633ca6529bbd363779e867566d1e | [log] [tgz] |
---|---|---|
author | Martin Storsjö <martin@martin.st> | Mon Nov 06 00:00:24 2023 +0200 |
committer | Copybara-Service <copybara-worker@google.com> | Sun Nov 05 14:05:38 2023 -0800 |
tree | a5c54961697bf66920cc197af3e26c9fc1038e57 | |
parent | 288cb1f0914217ab899247baa3cfbf1841617764 [diff] |
[LLD] [COFF] Handle undefined weak symbols in LTO (#70430) When reading the bitcode input, undefined weak symbols will show up as undefined symbols - which fails the early pass of checking for missing symbols in symtab.reportUnresolvable(), before doing the actual LTO compilation. Mark such symbols as deferUndefined (added in 3785a413feef896e8a022731cc6ed405d5ebe81b / https://reviews.llvm.org/D89004 for the -wrap option), to let them pass through this LTO precheck. After the LTO compilation, the weak undefined symbols will point towards an absolute null symbol as default. Such weak undefined symbols are used for the TLS init function in the Itanium C++ ABI, for TLS variables that potentially need to run a constructor, when accessed across translation units. This fixes https://github.com/llvm/llvm-project/issues/64513. GitOrigin-RevId: 1d95a071d6fc43fb413a0d3f5a9d1e52a18abab0
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.
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
.