forked from OSchip/llvm-project
9f1215b2d8
The contents from section .CRT$XLA to .CRT$XLZ is an array of function pointers. They are called by the runtime when a new thread is created or (gracefully) terminated. You can make your own initialization function to be called by that mechanism. All you have to do is: - Define a pointer to a function in a .CRT$XL* section using pragma - Make an external reference to "__tls_used" symbol That technique is used in many projects. This patch is to support that. What this patch does is to set the relative virtual address of "__tls_used" to the PECOFF directory table. __tls_used is actually a struct containing pointers to a symbol in .CRT$XLA and another symbol in .CRT$XLZ. The runtime looks at the directory table, gets the address of the struct, and call the function pointers between XLA and XLZ. llvm-svn: 218007 |
||
---|---|---|
.. | ||
cmake/modules | ||
docs | ||
include | ||
lib | ||
test | ||
tools | ||
unittests | ||
utils | ||
.arcconfig | ||
.clang-format | ||
.gitignore | ||
CMakeLists.txt | ||
LICENSE.TXT | ||
Makefile | ||
README.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.