forked from OSchip/llvm-project
![]() If all input files are compatible with Structured Exception Handling, linker is supposed to create an exectuable with a table for SEH handlers. The table consists of exception handlers entry point addresses. The basic idea of SEH in x86 Microsoft ABI is to list all valid entry points of exception handlers in an read-only memory, so that an attacker cannot override the addresses in it. In x86 ABI, data for exception handling is mostly on stack, so it's volnerable to stack overflow attack. In order to protect against it, Windows runtime uses the table to check a return address, to ensure that the address is really an valid entry point for an exception handler. Compiler emits a list of exception handler functions to .sxdata section. It also emits a marker symbol "@feat.00" to indicate that the object is compatible with SEH. SEH is a relatively new feature for COFF, and mixing SEH-compatible and SEH-incompatible objects will result in an invalid executable, so is the marker. If all input files are compatible with SEH, LLD emits a SEH table. SEH table needs to be pointed by Load Configuration strucutre, so when emitting a SEH table LLD emits it too. The address of a Load Configuration will be stored to the file header. llvm-svn: 202248 |
||
---|---|---|
.. | ||
cmake/modules | ||
docs | ||
include/lld | ||
lib | ||
test | ||
tools | ||
unittests | ||
utils | ||
.arcconfig | ||
.clang-format | ||
.gitignore | ||
CMakeLists.txt | ||
LICENSE.TXT | ||
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.