mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-28 02:37:37 +00:00
ba890da287
Fixes PR45594. In `ObjFile<ELFT>::initializeSymbols()`, for a defined symbol relative to a discarded section (due to section group rules), it may have been inserted as a lazy symbol. We need to demote it to an Undefined to enable the `discarded section` error happened in a later pass. Add `LazyObjFile::fetched` (if true) and `ArchiveFile::parsed` (if false) to represent that there is an ongoing lazy symbol fetch and we should replace the current lazy symbol with an Undefined, instead of calling `Symbol::resolve` (`Symbol::resolve` should be called if the lazy symbol was added by an unrelated archive/lazy object). As a side result, one small issue in start-lib-comdat.s is now fixed. The hack motivating D51892 will be unsupported: if `.gnu.linkonce.t.__i686.get_pc_thunk.bx` in an archive is referenced by another section, this will likely be errored unless the function is also defined in a regular object file. (Bringing back rL330869 would error `undefined symbol` instead of the more relevant `discarded section`.) Note, glibc i386's crti.o still works (PR31215), because `.gnu.linkonce.t.__x86.get_pc_thunk.bx` is in crti.o (one of the first regular object files in a linker command line). Reviewed By: psmith Differential Revision: https://reviews.llvm.org/D79300 |
||
---|---|---|
.. | ||
cmake/modules | ||
COFF | ||
Common | ||
docs | ||
ELF | ||
include/lld | ||
lib | ||
MachO | ||
MinGW | ||
test | ||
tools/lld | ||
unittests | ||
utils | ||
wasm | ||
.clang-format | ||
.clang-tidy | ||
.gitignore | ||
CMakeLists.txt | ||
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.