hanchenye-llvm-project/compiler-rt/lib/crt
Jian Cai 155a43edb0 [compiler-rt][crt] make test case nontrivial in check_cxx_section_exists
Summary:
.init_array gets optimized away when building with -O2 and as a result,
check_cxx_section_exists failed to pass -DCOMPILER_RT_HAS_INITFINI_ARRAY
when building crtbegin.o and crtend.o, which causes binaries linked with
them encounter segmentation fault. See https://crbug.com/855759 for
details. This change prevents .init_array section to be optimized away
even with -O2 or higher optimization level.

Subscribers: dberris, mgorny, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D67628

llvm-svn: 372038
2019-09-16 21:47:47 +00:00
..
CMakeLists.txt [compiler-rt][crt] make test case nontrivial in check_cxx_section_exists 2019-09-16 21:47:47 +00:00
crtbegin.c [compiler-rt] Fix crtbegin.c compilation 2019-05-11 02:33:33 +00:00
crtend.c Reland "[compiler-rt] Simple crtbegin.o and crtend.o implementation" 2019-04-30 18:13:22 +00:00