hanchenye-llvm-project/lld
Rafael Espindola 4f013bb3b2 Create an OutputSection for each non-empty OutputSectionCommand.
We were already pretty close, the one exception was when a name was
reused in another SECTIONS directive:

SECTIONS {
  .text : { *(.text) }
  .data : { *(.data) }
}
SECTIONS {
  .data : { *(other) }
}

In this case we would create a single .data and magically output
"other" while looking at the first OutputSectionCommand.

We now create two .data sections. This matches what gold does. If we
really want to create a single one, we should change the parser so that
the above is parsed as if the user had written

SECTIONS {
  .text : { *(.text) }
  .data : { *(.data) *(other)}
}

That is, there should be only one OutputSectionCommand for .data and
it would have two InputSectionDescriptions.

By itself this patch makes the code a bit more complicated, but is an
important step in allowing assignAddresses to operate just on the
linker script.

llvm-svn: 301484
2017-04-26 22:30:15 +00:00
..
COFF Fix comments again. 2017-04-26 20:20:05 +00:00
ELF Create an OutputSection for each non-empty OutputSectionCommand. 2017-04-26 22:30:15 +00:00
cmake/modules [lld][cmake] Fix BUILD_SHARED_LIBS installation 2017-01-24 10:41:02 +00:00
docs Improve the documentation. Patch from genewitch. Found on https://github.com/llvm-mirror/lld/pull/5 2017-03-02 10:40:24 +00:00
include/lld [Core] Fix parallel_for for Linux 2017-04-07 08:11:28 +00:00
lib [MachO/X86_64] Simplify isDataInCodeTransition(). 2017-04-15 01:50:51 +00:00
test Create an OutputSection for each non-empty OutputSectionCommand. 2017-04-26 22:30:15 +00:00
tools/lld Accept not only lld-link but also LLD-LINK, for example. 2017-04-12 18:29:52 +00:00
unittests Fix signed/unsigned comparison warning in a unit test. This was appearing on 2017-04-07 08:48:17 +00:00
.arcconfig Upgrade all the .arcconfigs to https. 2016-07-14 13:15:37 +00:00
.clang-format
.gitignore
CMakeLists.txt [cmake] Support running tests in stand-alone builds 2017-01-31 14:10:20 +00:00
CODE_OWNERS.TXT
LICENSE.TXT Update copyright year to 2016. 2016-03-30 22:40:59 +00:00
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.