hanchenye-llvm-project/lld/test
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 Handle _LINK_ env string as command line parameters. 2017-04-24 22:20:03 +00:00
Driver/Inputs Remove the old ELF linker. 2016-02-28 00:10:58 +00:00
ELF Create an OutputSection for each non-empty OutputSectionCommand. 2017-04-26 22:30:15 +00:00
Unit Replace hardcoded comment at 'lit.site.cfg.in' 2016-04-16 07:09:39 +00:00
darwin
mach-o Partially revert r287009: Remove trailing whitespace. 2016-11-15 19:09:13 +00:00
CMakeLists.txt Add missing test dependency. 2017-03-01 23:11:58 +00:00
lit.cfg [test] Fix zlib cond when building stand-alone, clean up 2017-02-08 20:08:29 +00:00
lit.site.cfg.in [test] Fix zlib cond when building stand-alone, clean up 2017-02-08 20:08:29 +00:00