| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: In the ELF linker, we create the buffer identifier for bitcode files by appending the object name to the archive name. This change makes the COFF linker do the same. Without the change, ThinLTO builds can fail with an error message about multiple ThinLTO modules per object file, caused by object files contained in different archives having the same name.
Reviewers: pcc, ruiu
Reviewed By: pcc
Subscribers: mehdi_amini
Differential Revision: https://reviews.llvm.org/D31402
llvm-svn: 298942
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: The COFF linker previously implemented link-time optimization using an API which has now been marked as legacy. This change refactors the COFF linker to use the new LTO API, which is also used by the ELF linker.
Reviewers: pcc, ruiu
Reviewed By: pcc
Subscribers: mgorny, mehdi_amini
Differential Revision: https://reviews.llvm.org/D29059
llvm-svn: 293967
|
|
|
|
|
|
| |
misc-unused-using-decls NFC
llvm-svn: 293380
|
|
|
|
|
|
| |
The two overloaded functions hid each other. This patch merges them.
llvm-svn: 291222
|
|
|
|
|
|
|
|
|
|
|
|
| |
I thought for a while about how to remove it, but it looks like we
can just copy the file for now. Of course I'm not happy about that,
but it's just less than 50 lines of code, and we already have
duplicate code in Error.h and some other places. I want to solve
them all at once later.
Differential Revision: https://reviews.llvm.org/D27819
llvm-svn: 290062
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Profiling revealed that the majority of lld's execution time on Windows was
spent opening and mapping input files. We can reduce this cost significantly
by performing these operations asynchronously.
This change introduces a queue for all operations on input file data. When
we discover that we need to load a file (for example, when we find a lazy
archive for an undefined symbol, or when we read a linker directive to
load a file from disk), the file operation is launched using a future and
the symbol resolution operation is enqueued. This implies another change
to symbol resolution semantics, but it seems to be harmless ("ninja All"
in Chromium still succeeds).
To measure the perf impact of this change I linked Chromium's chrome_child.dll
with both thin and fat archives.
Thin archives:
Before (median of 5 runs): 19.50s
After: 10.93s
Fat archives:
Before: 12.00s
After: 9.90s
On Linux I found that doing this asynchronously had a negative effect on
performance, probably because the cost of mapping a file is small enough that
it becomes outweighed by the cost of managing the futures. So on non-Windows
platforms I use the deferred execution strategy.
Differential Revision: https://reviews.llvm.org/D27768
llvm-svn: 289760
|
|
|
|
|
|
|
|
| |
members have been read.
Differential Revision: https://reviews.llvm.org/D27667
llvm-svn: 289414
|
|
|
|
|
|
|
|
|
| |
This ports the ELF linker's symbol table design, introduced in r268178,
to the COFF linker.
Differential Revision: http://reviews.llvm.org/D21166
llvm-svn: 289280
|
|
|
|
|
|
|
|
|
| |
Profiling revealed that we were spending 5% of our time linking
chrome_child.dll just in this call to toString().
Differential Revision: https://reviews.llvm.org/D27628
llvm-svn: 289270
|
|
|
|
| |
llvm-svn: 289102
|
|
|
|
|
|
| |
This reverts commit r289084 to appease buildbots.
llvm-svn: 289086
|
|
|
|
|
|
| |
We don't want ELF and COFF to diverge too much.
llvm-svn: 289085
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, we had different way to stringize SymbolBody and InputFile
to construct error messages. This patch defines overloaded function
toString() so that we don't need to memorize all these different
function names.
With that change, it is now easy to include demangled names in error
messages. Now, if there is a symbol name conflict, we'll print out
both mangled and demangled names.
llvm-svn: 288992
|
|
|
|
|
|
|
|
|
|
| |
Previously, we discarded .debug$ sections. This patch adds them to
files so that PDB.cpp can access them.
This patch also adds a debug option, /dumppdb, to dump debug info
fed to createPDB so that we can verify that valid data has been passed.
llvm-svn: 287555
|
|
|
|
|
|
|
|
| |
This would trigger an assertion at runtime otherwise.
Differential Revision: https://reviews.llvm.org/D26482
llvm-svn: 286562
|
|
|
|
| |
llvm-svn: 281670
|
|
|
|
|
|
|
|
|
|
| |
diagnostics.
Also change a few getName() calls to getShortName() calls.
https://reviews.llvm.org/D23123
Part of PR28553.
llvm-svn: 277616
|
|
|
|
| |
llvm-svn: 277600
|
|
|
|
| |
llvm-svn: 277599
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This flag is implemented similarly to --reproduce in the ELF linker.
This patch implements /linkrepro by moving the cpio writer and associated
utility functions to lldCore, and using that implementation in both linkers.
One COFF-specific detail is that we store the object file from which the
resource files were created in our reproducer, rather than the resource
files themselves. This allows the reproducer to be used on non-Windows
systems for example.
Differential Revision: https://reviews.llvm.org/D22418
llvm-svn: 276719
|
|
|
|
| |
llvm-svn: 275513
|
|
|
|
|
|
|
| |
Previously, one of two check functions didn't return a value.
It was confusing. This patch makes both functions return values.
llvm-svn: 275511
|
|
|
|
|
|
| |
This change makes the control flow more explicit.
llvm-svn: 275504
|
|
|
|
| |
llvm-svn: 275501
|
|
|
|
|
|
| |
This new name is also consistent with ELF.
llvm-svn: 275500
|
|
|
|
|
|
| |
The new name is consistent with ELF.
llvm-svn: 275499
|
|
|
|
| |
llvm-svn: 275480
|
|
|
|
| |
llvm-svn: 275362
|
|
|
|
|
|
| |
ErrorOr<...> to Expected<...> in r274160.
llvm-svn: 274161
|
|
|
|
|
|
| |
Differential revision: http://reviews.llvm.org/D19348
llvm-svn: 267008
|
|
|
|
| |
llvm-svn: 266714
|
|
|
|
|
|
|
| |
Make sure lld enables ODR type uniquing for debug info when invoking
LTO, as a follow-up to LLVM r266549.
llvm-svn: 266555
|
|
|
|
| |
llvm-svn: 266375
|
|
|
|
|
|
|
|
| |
This reverts commit r266365 and r266367, the contexts in the two
places have to match.
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266373
|
|
|
|
|
| |
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266367
|
|
|
|
|
| |
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266365
|
|
|
|
|
|
|
|
|
| |
Expected<...>
With the llvm change in r265606 this is the matching needed change to the lld
code now that createBinary() is returning Expected<...> .
llvm-svn: 265607
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LLD type-punned an integral type and a pointer type using a pointer
field. This is problematic because the pointer type has alignment
greater than some of the integral values.
This would be less problematic if a union was used but it turns out the
integral values are only present for a short, transient, amount of time.
Let's remove this undefined behavior by skipping the punning altogether
by storing the state in a separate memory location: a vector which
informs us which symbols to process for weak externs.
llvm-svn: 263918
|
|
|
|
|
|
|
|
|
| |
This fixes a test which exposed an ASan issue.
We assumed that a symbol's section number had a corresponding section
without performing validation.
llvm-svn: 263558
|
|
|
|
| |
llvm-svn: 257220
|
|
|
|
| |
llvm-svn: 254725
|
|
|
|
|
|
|
| |
in r252192 that changed the Archive and Child interfaces in libObject. These include
Rafael Espindola’s many suggested updates.
llvm-svn: 252193
|
|
|
|
| |
llvm-svn: 252166
|
|
|
|
|
|
| |
LTOModule doesn't seem to be thread-safe, so guard that with mutex.
llvm-svn: 248102
|
|
|
|
|
|
|
|
| |
There is no sense to use Name in these lines as it is not initialized yet.
Patch from Igor Kudrin!
llvm-svn: 247531
|
|
|
|
|
|
|
|
|
| |
Previously, we calculated our own hash values for section contents.
Of coruse that's slow because we had to access all bytes in sections.
Fortunately, COFF objects usually contain hash values for COMDAT
sections. We can use that to speed up Identical COMDAT Folding.
llvm-svn: 246869
|
|
|
|
| |
llvm-svn: 246662
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes a subtle incompatibility with MSVC linker.
MSVC linker preserves the original spelling of a DLL in the
import descriptor table. LLD previously converted all
characters to lowercase. Usually this difference is benign,
but if a program explicitly checks for DLL file names, the
program could fail.
llvm-svn: 246620
|
|
|
|
|
|
| |
This patch is to make COFF coding style consistent with ELF. NFC.
llvm-svn: 245282
|
|
|
|
|
|
|
|
|
|
|
| |
__NULL_IMPORT_DESCRIPTOR is a symbol used by MSVC liner to construct
the import descriptor table. We do not use the symbol. Previously,
we had code to skip that symbol. That code does not actually do
anything meaningful because no one is referencing the symbol, the
symbol would naturally be ignored. This patch stops recognizing
the symbol.
llvm-svn: 245280
|