diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2017-04-26 22:30:15 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2017-04-26 22:30:15 +0000 |
commit | 4f013bb3b2ea6a6b2df422bc3387662b26935525 (patch) | |
tree | 9ee450cb2d9deac1e8e9a310125f4962bb41c764 /clang/unittests/Tooling/CompilationDatabaseTest.cpp | |
parent | 8186cd43e2b28eeb6b2e3252049b2bc7cf835fcf (diff) | |
download | llvm-4f013bb3b2ea6a6b2df422bc3387662b26935525.zip llvm-4f013bb3b2ea6a6b2df422bc3387662b26935525.tar.gz llvm-4f013bb3b2ea6a6b2df422bc3387662b26935525.tar.bz2 |
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
Diffstat (limited to 'clang/unittests/Tooling/CompilationDatabaseTest.cpp')
0 files changed, 0 insertions, 0 deletions