| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Patch by Rahul Chaudhry!
This change adds experimental support for SHT_RELR sections, proposed
here: https://groups.google.com/forum/#!topic/generic-abi/bX460iggiKg
Pass '--pack-dyn-relocs=relr' to enable generation of SHT_RELR section
and DT_RELR, DT_RELRSZ, and DT_RELRENT dynamic tags.
Definitions for the new ELF section type and dynamic array tags, as well
as the encoding used in the new section are all under discussion and are
subject to change. Use with caution!
Pass '--use-android-relr-tags' with '--pack-dyn-relocs=relr' to use
SHT_ANDROID_RELR section type instead of SHT_RELR, as well as
DT_ANDROID_RELR* dynamic tags instead of DT_RELR*. The generated
section contents are identical.
'--pack-dyn-relocs=android+relr --use-android-relr-tags' enables both
'--pack-dyn-relocs=android' and '--pack-dyn-relocs=relr': lld will
encode the relative relocations in a SHT_ANDROID_RELR section, and pack
the rest of the dynamic relocations in a SHT_ANDROID_REL(A) section.
Differential Revision: https://reviews.llvm.org/D48247
llvm-svn: 336594
|
|
|
|
|
|
|
|
|
| |
This patch adds the target call back relaxTlsLdToLe to support TLS relaxation
from local dynamic to local exec model.
Differential Revision: https://reviews.llvm.org/D48293
llvm-svn: 336559
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The reference implementation uses a case-insensitive string
comparison for strings of equal length. This will cause the
string "tEo" to compare less than "VUo". However we were using
a case sensitive comparison, which would generate the opposite
outcome. Switch to a case insensitive comparison. Also, when
one of the strings contains non-ascii characters, fallback to
a straight memcmp.
The only way to really test this is with a DIA test. Before this
patch, the test will fail (but succeed if link.exe is used instead
of lld-link). After the patch, it succeeds even with lld-link.
llvm-svn: 336464
|
|
|
|
|
|
|
| |
This covers the following line which was untested:
https://github.com/llvm-mirror/lld/blob/master/ELF/Symbols.cpp#L170
llvm-svn: 336443
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
They were failing in Chromium's packaging builds with:
C:\b\rr\tmphqfaff\w\src\third_party\llvm\tools\lld\test\COFF\pdb-globals-dia-vfunc-collision2.test:24:8:
error: expected string not found in input
CHECK: func [0x00001060+ 0 - 0x0000106c-12 | sizeof= 12] (FPO) virtual int __cdecl A132()
^
<stdin>:8:11: note: scanning from here
struct S [sizeof = 8] {
^
<stdin>:9:2: note: possible intended match here
func [0x00001060+ 0 - 0x0000106c-12 | sizeof= 12] (FPO) virtual int __cdecl S::A132()
^
Maybe due to different DIA versions.
llvm-svn: 336424
|
|
|
|
| |
llvm-svn: 336423
|
|
|
|
|
|
|
|
|
| |
Remove support for linking microMIPS 64-bit code because this kind of
ISA is rarely used and unsupported by LLVM.
Differential revision: https://reviews.llvm.org/D48949
llvm-svn: 336413
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We add an option to dump the entire global / public symbol record
stream. Previously we would dump globals or publics, but not both.
And when we did dump them, we would always dump them in the order
they were referenced by the corresponding hash streams, not in
the order they were serialized in. This patch adds a lower level
mode that just dumps the whole stream in serialization order.
Additionally, when dumping global-extras, we now dump the hash
bitmap as well as the record offset instead of dumping all zeros
for the offsets.
llvm-svn: 336407
|
|
|
|
|
|
|
|
|
|
|
| |
It seems like the debugger first computes a symbol's bucket,
and then does a binary search of entries in the bucket using the
symbol's name in order to find it. If the bucket entries are not
in sorted order, this obviously won't work. After this patch a
couple of simple test cases show that we generate an exactly
identical GSI hash stream, which is very nice.
llvm-svn: 336405
|
|
|
|
|
|
|
|
|
|
| |
In this file we only have to handle the v2 ABI, so what we need to do
is to just make sure that all object files have v2 or unspecified version
number.
Differential Revision: https://reviews.llvm.org/D48112
llvm-svn: 336372
|
|
|
|
|
|
| |
Reported by Chris Jackson.
llvm-svn: 336366
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When PT_INTERP is specified in PHDRS command, it should be created.
(if other conditions met)
We had no test for the folowing line:
https://github.com/llvm-mirror/lld/blob/master/ELF/LinkerScript.cpp#L1108
And for this header itself.
Patch fixes that.
llvm-svn: 336359
|
|
|
|
|
|
|
|
|
|
| |
This is to test the following line of the code:
https://github.com/llvm-mirror/lld/blob/master/ELF/SymbolTable.cpp#L681
If symbol does not start from _Z prefix and we have extern "C++",
we do not call demangler and use its name as is.
llvm-svn: 336353
|
|
|
|
|
|
|
|
|
| |
C++.
This tests the following 'continue' line in getDemangledSyms():
https://github.com/llvm-mirror/lld/blob/master/ELF/SymbolTable.cpp#L677
llvm-svn: 336349
|
|
|
|
|
|
|
|
|
| |
This is to test the following line of code:
https://github.com/llvm-mirror/lld/blob/master/ELF/SymbolTable.cpp#L601
Without that line linker would crash.
llvm-svn: 336345
|
|
|
|
|
|
|
|
|
| |
This covers the following code line with a test:
https://github.com/llvm-mirror/lld/blob/master/ELF/LTO.cpp#L213
After that, coverage of LTO.cpp is 100%.
llvm-svn: 336342
|
|
|
|
|
|
|
|
|
|
|
|
| |
index file.
Test case ensures lld generates an error if unable to
write an empty index file for lazy object file that is not added to link.
This covers the following line with a test:
https://github.com/llvm-mirror/lld/blob/master/ELF/LTO.cpp#L206
llvm-svn: 336340
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is https://bugs.llvm.org//show_bug.cgi?id=37836
Previously LLD could assign to Dot or set the address
for the section with address expression but did not advance
the position in a memory region.
Patch fixes the issue.
llvm-svn: 336335
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We did not have a test that would test that
_etext address is equal to etext, _end == end and _edata == edata.
Because of that, the following line was never
executed when running our tests:
https://github.com/llvm-mirror/lld/blob/master/ELF/Writer.cpp#L928
Patch fixes that.
llvm-svn: 336280
|
|
|
|
|
|
|
|
|
| |
The following check was uncovered with tests:
https://github.com/llvm-mirror/lld/blob/master/ELF/InputFiles.cpp#L159
Patch adds test to cover it.
llvm-svn: 336273
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have a following comment for createEmptyIndex caller code:
// If LazyObjFile has not been added to link, emit empty index files.
// This is needed because this is what GNU gold plugin does and we have a
// distributed build system that depends on that behavior.
Though createEmptyIndex() itself
(https://github.com/llvm-mirror/lld/blob/master/ELF/LTO.cpp#L202)
is never called in our test cases.
Patch adds a test.
llvm-svn: 336270
|
|
|
|
|
|
|
|
|
|
|
|
| |
ELF spec doesn't allow a relocation to point to a deduplicated
COMDAT section. Unfortunately this happens in practice (e.g. .eh_frame)
We have a code in MarkLive.cpp for that and it was uncovered by any test case:
https://github.com/llvm-mirror/lld/blob/master/ELF/MarkLive.cpp#L199
Patch adds a test.
llvm-svn: 336259
|
|
|
|
| |
llvm-svn: 336201
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|