| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
Forward declare InputSectionDescription as struct not class.
llvm-svn: 320801
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch provides the mechanism to fix instances of the instruction
sequence that may trigger the cortex-a53 843419 erratum. The fix is
provided by an alternative instruction sequence to remove one of the
erratum conditions. To reach this alternative instruction sequence we
replace the original instruction with a branch to the alternative
sequence. The alternative sequence is responsible for branching back to
the original.
As there is only erratum to fix the implementation is specific to
AArch64 and the specific erratum conditions. It should be generalizable
to other targets and erratum if needed.
Differential Revision: https://reviews.llvm.org/D36749
llvm-svn: 320800
|
|
|
|
| |
llvm-svn: 320772
|
|
|
|
|
|
|
|
|
|
| |
Specifically, libwidevinecdm.so in Chrome has such bad symbol.
It seems the BFD linker handles them as local symbols, so instead
of inserting them to the symbol table, we should skip them too.
Differential Revision: https://reviews.llvm.org/D41257
llvm-svn: 320770
|
|
|
|
| |
llvm-svn: 320671
|
|
|
|
|
|
|
|
|
|
|
|
| |
We might crash in 'ARMExidxSentinelSection::writeTo()' because it expected
the sentinel entry to be put in the same 'InputSectionDescription' as
the last real entry. This assumption fails if the last output section command
for .ARM.exidx is anything but an input section description, because in this
case 'OutputSection::addSection()' creates a new 'InputSectionDescription'.
Differential Revision: https://reviews.llvm.org/D41105
llvm-svn: 320668
|
|
|
|
|
|
|
| |
We would fail an assert if a shared library had a local symbol after
sh_info.
llvm-svn: 320667
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is currently in InputSectionBase. Only InputSections are used in
ICF, so Repl should be move to InputSection to clear the class
hierarchy or, like this patch does, to SectionBase for convenience.
The convenience of having it on the base class is that we can just
access the replacement without having to first check if it is an
InputSection. It is a bit less code and a bit faster as some of this
code is very hot.
I got up to 1.77% improvement in clang-gdb-index and no regressions
according to lnt.
llvm-svn: 320654
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D41204
llvm-svn: 320652
|
|
|
|
|
|
|
|
|
|
|
|
| |
Having a SectionBase method check Repl is inconsistent with how we
handle other section information.
For example, if a section is replaced, Sec->Live is false and it is
natural for Sec->getOutputSection() to be null.
It is the symbol that is moved to the replacement section.
llvm-svn: 320599
|
|
|
|
|
|
| |
If a section has been replaced (Sec != Sec->Repl) it is not Live.
llvm-svn: 320597
|
|
|
|
|
|
| |
This runs before ICF, so Sec->Repl == Sec.
llvm-svn: 320543
|
|
|
|
| |
llvm-svn: 320542
|
|
|
|
|
|
|
| |
It is constructed with a kind of Regular and will dyn_cast to
InputSection, but is declared to be an InputSectionBase.
llvm-svn: 320539
|
|
|
|
| |
llvm-svn: 320520
|
|
|
|
| |
llvm-svn: 320502
|
|
|
|
|
|
|
|
|
|
| |
Moving the SHF_LINK_ORDER processing out of OutputSection::finalize()
means that we no longer need to copy all InputSections as we now only need
the first one.
Differential Revision: https://reviews.llvm.org/D40966
llvm-svn: 320478
|
|
|
|
|
|
|
|
|
|
| |
By moving this step before thunk creation and other processing that depends
on the size of sections, we permit removal of duplicates in the .ARM.exidx
section.
Differential Revision: https://reviews.llvm.org/D40964
llvm-svn: 320477
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The size of an OutputSection is calculated early, to aid handling of compressed
debug sections. However, subsequent to this point, unused synthetic sections are
removed. In the event that an OutputSection, from which such an InputSection is
removed, is still required (e.g. because it has a symbol assignment), and no longer
has any InputSections, dot assignments, or BYTE()-family directives, the size
member is never updated when processing the commands. If the removed InputSection
had a non-zero size (such as a .got.plt section), the section ends up with the
wrong size in the output.
The fix is to reset the OutputSection size prior to processing the linker script
commands relating to that OutputSection. This ensures that the size is correct even
in the above situation.
Additionally, to reduce the risk of developers misusing OutputSection Size and
InputSection OutSecOff, they are set to simply the number of InputSections in an
OutputSection, and the corresponding index respectively. We cannot completely
stop using them, due to SHF_LINK_ORDER sections requiring them.
Compressed debug sections also require the full size. This is now calculated in
maybeCompress for these kinds of sections.
Reviewers: ruiu, rafael
Differential Revision: https://reviews.llvm.org/D38361
llvm-svn: 320472
|
|
|
|
|
|
|
|
|
|
|
|
| |
By using an index instead of a pointer for verdef we can put the index
next to the alignment field. This uses the otherwise wasted area and
reduces the shared symbol size.
By itself the performance change of this is in the noise, but I have a
followup patch to remove another 8 bytes that improves performance
when combined with this.
llvm-svn: 320449
|
|
|
|
|
|
|
|
|
|
| |
An internal linker has support for merging identical data and in some
cases it can be a significant win.
This is behind an off by default flag so it has to be requested
explicitly.
llvm-svn: 320448
|
|
|
|
|
|
|
|
| |
These are not executable files so they shouldn't be marked as such.
Differential Revision: https://reviews.llvm.org/D41041
llvm-svn: 320438
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When an output section has no byte commands and has no input sections then it
would be ideal if the type of the section is SHT_NOBITS so that the file can
take up less space. This change sets the default type of of output sections to
SHT_NOBITS instead of SHT_PROGBITS to allow this. This required some minor test
changes (which double as tests for this new behavior) but extend-pt-load.s had
be changed in a non-trivial way. Since it seems to me that the point of the
test is to point out the consequences of how flags are assigned to output
sections that don't have input sections I changed the test to work and still
show how the memsize of the executable segment was changed.
Differential Revision: https://reviews.llvm.org/D41082
llvm-svn: 320437
|
|
|
|
| |
llvm-svn: 320436
|
|
|
|
|
|
|
|
| |
This fixes an assertion error introduced by r320390.
Differential Revision: https://reviews.llvm.org/D41095
llvm-svn: 320431
|
|
|
|
|
|
|
|
| |
The PPC port doesn't support PLT yet, but the architecture independent
code optimizes PLT access for non preemptible symbols, which is
exactly what returning R_PC was trying to implement.
llvm-svn: 320430
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: ruiu, grimar
Reviewed By: ruiu
Subscribers: emaste, nemanjai, javed.absar, kbarton, llvm-commits
Differential Revision: https://reviews.llvm.org/D40962
llvm-svn: 320416
|
|
|
|
|
|
|
|
|
| |
Now that gc sections runs after linker defined symbols are added it
can see symbols that point to an OutputSection.
Should fix a bot failure.
llvm-svn: 320412
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes pr35570.
We were creating these symbols after parsing version scripts, so they
could not be versioned.
We cannot move the version script parsing later because we need it for
lto.
One option is to move both addReservedSymbols and
createSyntheticSections earlier. The disadvantage is that some
sections created by createSyntheticSections replace other input
sections. For example, gdb index replaces .debug_gnu_pubnames, so it
wants to run after gc sections so that it can set S->Live to false.
What this patch does instead is to move just the ElfHeader creation
early.
llvm-svn: 320390
|
|
|
|
| |
llvm-svn: 320327
|
|
|
|
| |
llvm-svn: 320324
|
|
|
|
| |
llvm-svn: 320323
|
|
|
|
|
|
|
|
| |
See https://reviews.llvm.org/D39226
Patch by vit9696 <vit9696@avp.su>
llvm-svn: 320286
|
|
|
|
|
|
|
| |
They were not used in InputFiles.h and it was getting too easy to add
circular includes.
llvm-svn: 320256
|
|
|
|
| |
llvm-svn: 320200
|
|
|
|
| |
llvm-svn: 320198
|
|
|
|
|
|
|
|
| |
This flag can be ignored because we always emit long PLTs.
Differential Revision: https://reviews.llvm.org/D41025
llvm-svn: 320178
|
|
|
|
| |
llvm-svn: 320175
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: ruiu, grimar
Reviewed By: ruiu
Subscribers: emaste, javed.absar, llvm-commits
Differential Revision: https://reviews.llvm.org/D40963
llvm-svn: 320147
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D40994
llvm-svn: 320130
|
|
|
|
| |
llvm-svn: 320072
|
|
|
|
| |
llvm-svn: 320070
|
|
|
|
|
|
|
| |
With this memory usage when linking clang goes from 174.62MB to
172.77MB.
llvm-svn: 320069
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
I also changed the message to print both the ISA and the the architecture
name for incompatible files. Previously it would be quite hard to find the
actual path of the incompatible object files in projects that have many
object files with the same name in different directories.
Reviewers: atanasyan, ruiu
Reviewed By: atanasyan
Subscribers: emaste, sdardis, llvm-commits
Differential Revision: https://reviews.llvm.org/D40958
llvm-svn: 320056
|
|
|
|
|
|
|
|
| |
Both ld.bfd and ld.gold can handle this case.
Differential Revision: https://reviews.llvm.org/D40878
llvm-svn: 320006
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D40928
llvm-svn: 320005
|
|
|
|
|
|
|
|
|
|
| |
This reduces total allocations when linking clang fsds from 263.21MB
to 174.62MB.
This also has some very nice speed improvements on some
benchmarks. Chromium and clang fsds link 6% faster.
llvm-svn: 319976
|
|
|
|
|
|
|
|
|
| |
This patch is to rename check CHECK and make it a C macro, so that
we can evaluate the second argument lazily.
Differential Revision: https://reviews.llvm.org/D40915
llvm-svn: 319974
|
|
|
|
|
|
|
| |
This brings memory allocations when linking clang from 270.96MB to
267.80MB.
llvm-svn: 319932
|
|
|
|
|
|
|
| |
Total memory allocation when linking clang goes from 281.80MB to
270.96MB.
llvm-svn: 319930
|