Go to file
Peter Collingbourne 381b3d8aa3 COFF: Use (name, output characteristics) as a key when grouping input sections into output sections.
This is what link.exe does and lets us avoid needing to worry about
merging output characteristics while adding input sections to output
sections.

With this change we can't process /merge in the same way as before
because sections with different output characteristics can still
be merged into one another. So this change moves the processing of
/merge to just before we assign addresses. In the case where there
are multiple output sections with the same name, link.exe only merges
the first section with the source name into the first section with
the target name, and we do the same.

At the same time I also implemented transitive merging (which means
that /merge:.c=.b /merge:.b=.a merges both .c and .b into .a).

This isn't quite enough though because link.exe has a special case for
.CRT in 32-bit mode: it processes sections whose output characteristics
are DATA | R | W as though the output characteristics were DATA | R
(so that they get merged into things like constructor lists in the
expected way). Chromium has a few such sections, and it turns out
that those sections were causing the problem that resulted in r318699
(merge .xdata into .rdata) being reverted: because of the previous
permission merging semantics, the .CRT sections were causing the entire
.rdata section to become writable, which caused the SEH runtime to
crash because it apparently requires .xdata to be read-only. This
change also implements the same special case.

This should unblock being able to merge .xdata into .rdata by default,
as well as .bss into .data, both of which will be done in followups.

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

llvm-svn: 330479
2018-04-20 21:10:33 +00:00
clang [X86] WaitPKG intrinsics 2018-04-20 18:44:33 +00:00
clang-tools-extra Parse .h files as objective-c++ if we don't have a compile command. 2018-04-20 11:35:17 +00:00
compiler-rt Revert "[Sanitizer] Internal Printf string precision argument + padding." 2018-04-20 20:24:02 +00:00
debuginfo-tests [Darwin] Specify DWARF 2/4 when running apple accelerator tests. 2018-02-26 20:56:45 +00:00
libclc powr: Use denormal path only 2018-04-17 19:35:32 +00:00
libcxx Don't do aligned allocations on MSVCRT before 19.12 (update 15.3) 2018-04-19 22:12:10 +00:00
libcxxabi [libc++abi] Replace __sync_* functions with __libcpp_atomic_* functions. 2018-04-16 22:00:14 +00:00
libunwind [cmake] Remove duplicate command line options from build 2018-04-05 20:27:50 +00:00
lld COFF: Use (name, output characteristics) as a key when grouping input sections into output sections. 2018-04-20 21:10:33 +00:00
lldb Fix the Xcode gtest target for the move of FileSpecTest.cpp. 2018-04-20 18:30:31 +00:00
llgo irgen: Create functions instead of global variables for builtin hash and equal algorithms. 2017-06-04 22:11:28 +00:00
llvm [llvm-objcopy] Fix sh_link 2018-04-20 20:46:04 +00:00
openmp [OpenMP] Make bc file compilation sensitive to LIBOMPTARGET_NVPTX_DEBUG flag 2018-04-20 20:41:00 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly [isl++] abort() on assertion violation. 2018-04-20 18:59:13 +00:00
README.md Add an svn project to contain the files that appear at the root of the 2017-10-19 21:09:49 +00:00

README.md

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.