hanchenye-llvm-project/llvm
Tim Shen a5cc25e50f [SSP] Do not set __guard_local to hidden for OpenBSD SSP
__guard_local is defined as long on OpenBSD. If the source file contains
a definition of __guard_local, it mismatches with the int8 pointer type
used in LLVM. In that case, Module::getOrInsertGlobal() returns a
cast operation instead of a GlobalVariable. Trying to set the
visibility on the cast operation leads to random segfaults (seen when
compiling the OpenBSD kernel, which also runs with stack protection).

In the kernel, the hidden attribute does not matter. For userspace code,
__guard_local is defined as hidden in the startup code. If a program
re-defines __guard_local, the definition from the startup code will
either win or the linker complains about multiple definitions
(depending on whether the re-defined __guard_local is placed in the
common segment or not).

It also matches what gcc on OpenBSD does.

Thanks Stefan Kempf <sisnkemp@gmail.com> for the patch!

Differential Revision: http://reviews.llvm.org/D23674

llvm-svn: 279449
2016-08-22 18:26:27 +00:00
..
bindings
cmake [CMake/ASan] Skip using libedit if ASan is enabled -- it leaks memory. 2016-08-20 07:05:13 +00:00
docs Fix link quotes on AArch64's CompilerWriterInfo section. 2016-08-18 22:10:06 +00:00
examples Replace a few more "fall through" comments with LLVM_FALLTHROUGH 2016-08-17 20:30:52 +00:00
include [mips][ias] Support .dtprel[d]word and .tprel[d]word directives 2016-08-22 16:18:42 +00:00
lib [SSP] Do not set __guard_local to hidden for OpenBSD SSP 2016-08-22 18:26:27 +00:00
projects
resources
runtimes [CMake] Add variables for tracking which runtimes are included 2016-08-18 22:18:11 +00:00
test [InstCombine] Allow sinking from unique predecessor with multiple edges 2016-08-22 18:21:56 +00:00
tools Fix Gold Plugin after API change in the LTO API (constify callback type) 2016-08-22 16:41:58 +00:00
unittests [asan] Add support of lifetime poisoning into ComputeASanStackFrameLayout 2016-08-20 16:48:24 +00:00
utils [X86] Create a new instruction format to handle 4VOp3 encoding. This saves one bit in TSFlags and simplifies MRMSrcMem/MRMSrcReg format handling. 2016-08-22 07:38:50 +00:00
.arcconfig Upgrade all the .arcconfigs to https. 2016-07-14 13:15:37 +00:00
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt [CMake] Silence message on multi-configuration generators 2016-08-18 18:17:28 +00:00
CODE_OWNERS.TXT test commit 2016-08-02 19:25:17 +00:00
CREDITS.TXT Shamelessly add myself to CREDITS.TXT 2016-08-04 16:28:22 +00:00
LICENSE.TXT Remove autoconf references from LICENSE.TXT 2016-08-12 20:11:03 +00:00
LLVMBuild.txt
README.txt Revert rL277454 2016-08-02 13:26:07 +00:00
RELEASE_TESTERS.TXT Adding RELEASE_TESTERS.TXT 2016-07-21 16:46:44 +00:00
configure
llvm.spec.in

README.txt

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.