| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 336201
|
|
|
|
|
|
|
| |
Minor follow up for r336197
"[ELF] - Add support for '||' and '&&' in linker scripts."
llvm-svn: 336199
|
|
|
|
|
|
|
| |
This is https://bugs.llvm.org//show_bug.cgi?id=37976,
we had no support, but seems someone faced it.
llvm-svn: 336197
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LLD removes empty output sections otherwise specified in the linker
script. Prior to this change however, if section descriptions included
ANY kind of symbol assignment, then the consequent output section would
not be removed, even if the assignment was marked with PROVIDE and not
actually triggered (i.e. the symbol was never referenced). This change
modifies the isDiscarable function to ignore such directives when
determining whether a section should be discarded, in keeping with
bfd's behaviour. Symbol assignments that do result in a symbol
definition will continue to result in a kept section (this is not
actually the same as bfd's behaviour, but it is simpler, and probably
makes more sense).
Reviewed By: grimar
Differential Revision: https://reviews.llvm.org/D48771
llvm-svn: 336184
|
|
|
|
|
|
|
|
|
|
|
|
| |
The AArch64 -fix-cortex-a53-843419 is missing a test case for the load and
store exclusive instructions. This was leading to a function not being
covered in the codebase. This change adds two new instruction sequences to
be recognised as an instance of the erratum, one with a load exclusive the
other with a store exclusive.
Differential Revision: https://reviews.llvm.org/D48840
llvm-svn: 336181
|
|
|
|
|
|
| |
This restores the original comment in the test case.
llvm-svn: 336180
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Comment in the test case says that:
## This inputs previously created a 4gb temporarily file under 32 bit
## configuration. Issue was fixed. There is no clean way to check that from here.
## This testcase added for documentation purposes.
The intention of the test was to create such huge file
in case if our code will be broken again.
And currently it documents we do not create huge outputs.
r336129 changed -o to /dev/null and broke the intentions of the test case.
llvm-svn: 336179
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D48812
llvm-svn: 336143
|
|
|
|
| |
llvm-svn: 336136
|
|
|
|
| |
llvm-svn: 336135
|
|
|
|
|
|
| |
Post commit review at rLLD335992
llvm-svn: 336129
|
|
|
|
|
|
|
|
| |
Subscribers: dschuff, mehdi_amini, inglorion, jgravelle-google, aheejin, sunfish, steven_wu, llvm-commits
Differential Revision: https://reviews.llvm.org/D48689
llvm-svn: 336118
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have the following code that is uncovered with the test:
https://github.com/llvm-mirror/lld/blob/master/ELF/Target.cpp#L95
This patch:
1) Removes "!IS" check. Because at that point of execution
(we are reolving the relocations during writing output)
we should only have InputSection type of the sections in the vector.
(because we already converted MergeInputSection in mergeSections()
and combined EhInputSections in combineEhFrameSections()).
2) Covers the "!IS->getParent()" with the test.
llvm-svn: 336106
|
|
|
|
|
|
| |
It duplicated the default implementation.
llvm-svn: 336093
|
|
|
|
|
|
|
|
| |
This is followup for r335958.
Thanks to Rui for noticing.
llvm-svn: 336082
|
|
|
|
|
|
|
|
| |
Since the names are being hashed correctly now, enumerating them
returns them in a different order. Update the test to reflect
that.
llvm-svn: 336027
|
|
|
|
| |
llvm-svn: 335992
|
|
|
|
| |
llvm-svn: 335985
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previoulsy we had no test that covered malfolmed numbers
with 'H', 'K' and 'M' suffixes, so the following lines
were uncovered:
https://github.com/llvm-mirror/lld/blob/master/ELF/ScriptParser.cpp#L996
https://github.com/llvm-mirror/lld/blob/master/ELF/ScriptParser.cpp#L1003
https://github.com/llvm-mirror/lld/blob/master/ELF/ScriptParser.cpp#L1008
Patch fixes that.
llvm-svn: 335979
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
shouldKeepInSymtab is called from copyLocalSymbols:
https://github.com/llvm-mirror/lld/blob/master/ELF/Writer.cpp#L574
The pre-condition is that symbol should be Defined:
https://github.com/llvm-mirror/lld/blob/master/ELF/Writer.cpp#L572
And its section is Live:
https://github.com/llvm-mirror/lld/blob/master/ELF/Writer.cpp#L548
InputSection::Discarded section can never be Live. And hence I believe
check I removed in this patch is excessive.
llvm-svn: 335973
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cases.
CIEs augmentation string can have 'P' character,
what means the next byte is the personality encoding, a DW_EH_PE_xxx value.
This is followed by a pointer to the personality function.
We had the support of the different encodings earlier, but had no test cases.
This change adds coverage of DW_EH_PE_absptr/DW_EH_PE_signed/DW_EH_PE_udata2/DW_EH_PE_sdata2 and
DW_EH_PE_udata8/DW_EH_PE_sdata8 cases for place below:
https://github.com/llvm-mirror/lld/blob/master/ELF/EhFrame.cpp#L123
llvm-svn: 335969
|
|
|
|
|
|
|
|
|
|
|
|
| |
I do not think this code was ever alive,
because the following code says we can have OutputSection and
SymbolAssignment cases only. We already handle both of them.
https://github.com/llvm-mirror/lld/blob/master/ELF/ScriptParser.cpp#L502
FWIW, it is dead in the LLD code coverage reports I am running either.
llvm-svn: 335958
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We had no tests that checked how we print -Map output for
32 bit targets. Though there are at least 2 places where we have the difference.
(between 64 and 32 bits):
https://github.com/llvm-mirror/lld/blob/master/ELF/MapFile.cpp#L52
https://github.com/llvm-mirror/lld/blob/master/ELF/MapFile.cpp#L162
Patch adds just a trivial test to check we do right things in general.
llvm-svn: 335954
|
|
|
|
|
|
|
|
|
| |
In this mode, we retain the symbol table, but skip the actual debug
information.
Differential Revision: https://reviews.llvm.org/D48745
llvm-svn: 335947
|
|
|
|
|
|
|
|
|
|
|
| |
With this set, we retain the symbol table, but skip the actual debug
information.
This is meant to be used by the MinGW frontend.
Differential Revision: https://reviews.llvm.org/D48745
llvm-svn: 335946
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D48697
llvm-svn: 335881
|
|
|
|
|
|
|
|
|
|
| |
This change effects the behavior of --export-all. Previously
--export-all would only effect symbols that survived GC. Now
--export-all will prevent any non-local symbols from being GCed.
Differential Revision: https://reviews.llvm.org/D48673
llvm-svn: 335878
|
|
|
|
|
|
|
|
|
|
|
| |
Function symbols that come from bitcode have not signatures.
After LTO when the real symbols are read in we need to make
sure that we set the signature on the existing symbol.
the signature-less undefined functions.
Differential Revision: https://reviews.llvm.org/D48693
llvm-svn: 335875
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Control flow guard works best when targets it checks are 16-byte aligned.
Microsoft's link.exe helps ensure this by aligning code from sections
that are referenced from the gfids table to 16 bytes when linking with
-guard:cf, even if the original section specifies a smaller alignment.
This change implements that behavior in lld-link.
See https://crbug.com/857012 for more details.
Reviewers: ruiu, hans, thakis, zturner
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D48690
llvm-svn: 335864
|
|
|
|
|
|
|
|
|
| |
The following line of code was untested:
https://github.com/llvm-mirror/lld/blob/master/ELF/EhFrame.cpp#L94
Patch adds a test case.
llvm-svn: 335855
|
|
|
|
|
|
|
| |
This is to test the following line that was uncovered by LLD test cases yet:
https://github.com/llvm-mirror/lld/blob/master/ELF/EhFrame.cpp#L149
llvm-svn: 335852
|
|
|
|
|
|
|
|
|
| |
not supported" error.
It is https://github.com/llvm-mirror/lld/blob/master/ELF/EhFrame.cpp#L144,
and we had no test case to cover it.
llvm-svn: 335849
|
|
|
|
|
|
| |
fact. NFC
llvm-svn: 335848
|
|
|
|
|
|
|
| |
It's https://github.com/llvm-mirror/lld/blob/master/ELF/EhFrame.cpp#L147 line,
which was untested before this patch.
llvm-svn: 335847
|
|
|
|
|
|
|
|
|
|
| |
This test case adds test for the line that was uncovered previously:
https://github.com/llvm-mirror/lld/blob/master/ELF/EhFrame.cpp#L175
it errors out, but we now can test that we have expected flow,
which is different for CIE of version 1 and CIE of version 3.
llvm-svn: 335840
|
|
|
|
|
|
|
|
|
| |
It was https://github.com/llvm-mirror/lld/blob/master/ELF/EhFrame.cpp#L195
and we did not cover it with test.
Patch fixes it.
llvm-svn: 335838
|
|
|
|
|
|
|
|
|
| |
It is the following line:
https://github.com/llvm-mirror/lld/blob/master/ELF/EhFrame.cpp#L120
We did not cover it yet.
llvm-svn: 335833
|
|
|
|
| |
llvm-svn: 335826
|
|
|
|
|
|
| |
It was uncovered by our test cases.
llvm-svn: 335824
|
|
|
|
|
|
| |
It was uncovered by our test cases.
llvm-svn: 335819
|
|
|
|
|
|
|
|
|
| |
We has precompiled object with unsupported FDE version (=2).
It is possible to use llvm-mc instead for this test.
Patch do this change.
llvm-svn: 335818
|
|
|
|
| |
llvm-svn: 335784
|
|
|
|
|
|
| |
Post commit review at D48406
llvm-svn: 335743
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, ICF does not enable threading if we have less than 1024
sections in each equivalence class.
And the following code is uncovered by our test cases:
https://github.com/llvm-mirror/lld/blob/master/ELF/ICF.cpp#L404
This patch adds a test case that triggers the mentioned code to execute.
llvm-svn: 335738
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The local dynamic TLS access on PPC64 ELF v2 ABI uses R_PPC64_GOT_DTPREL16*
relocations when a TLS variables falls outside 2 GB of the thread storage
block. This patch adds support for these relocations by adding a new RelExpr
called R_TLSLD_GOT_OFF which emits a got entry for the TLS variable relative
to the dynamic thread pointer using the relocation R_PPC64_DTPREL64. It then
evaluates the R_PPC64_GOT_DTPREL16* relocations as the got offset for the
R_PPC64_DTPREL64 got entries.
Differential Revision: https://reviews.llvm.org/D48484
llvm-svn: 335732
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds the target call back relaxTlsGdToLe to support TLS relaxation
from global dynamic to local exec model.
The relaxation performs the following transformation:
addis r3, r2, x@got@tlsgd@ha --> nop
addi r3, r3, x@got@tlsgd@l --> addis r3, r13, x@tprel@ha
bl __tls_get_addr(x@tlsgd) --> nop
nop --> addi r3, r3, x@tprel@l
Differential Revision: https://reviews.llvm.org/D48082
llvm-svn: 335730
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is PR36768.
Linker script OVERLAYs are described in 4.6.9. Overlay Description of the spec:
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/4/html/Using_ld_the_GNU_Linker/sections.html
They are used to allow output sections which have different LMAs but the same VAs
and used for embedded programming.
Currently, LLD restricts overlapping of sections and that seems to be the most desired
behaviour for defaults. My thoughts about possible approaches for PR36768 are on the bug page,
this patch implements OVERLAY keyword and allows VAs overlapping for sections that within the overlay.
Differential revision: https://reviews.llvm.org/D44780
llvm-svn: 335714
|
|
|
|
| |
llvm-svn: 335713
|
|
|
|
|
|
|
|
|
| |
This is a less clever version of https://reviews.llvm.org/D48433.
This is a dumb version but I think I prefer this for its simplicity.
Differential Revision: https://reviews.llvm.org/D48621
llvm-svn: 335712
|
|
|
|
| |
llvm-svn: 335676
|