llvm-project/lld/COFF
Martin Storsjo 5f6d527f09 [COFF] Support linking to import libraries from GNU binutils
GNU binutils import libraries aren't the same kind of short import
libraries as link.exe and LLD produce, but are a plain static library
containing .idata section chunks. MSVC link.exe can successfully link
to them.

In order for imports from GNU import libraries to mix properly with the
normal import chunks, the chunks from the existing mechanism needs to
be added into named sections like .idata$2.

These GNU import libraries consist of one header object, a number of
object files, one for each imported function/variable, and one trailer.
Within the import libraries, the object files are ordered alphabetically
in this order. The chunks stemming from these libraries have to be
grouped by what library they originate from and sorted, to make sure
the section chunks for headers and trailers for the lists are ordered
as intended. This is done on all sections named .idata$*, before adding
the synthesized chunks to them.

Differential Revision: https://reviews.llvm.org/D38513

llvm-svn: 342777
2018-09-21 22:01:06 +00:00
..
CMakeLists.txt Merge {COFF,ELF}/Strings.cpp to Common/Strings.cpp. 2018-02-28 17:38:19 +00:00
Chunks.cpp [COFF] Add support for delay loading DLLs for ARM64 2018-09-18 07:22:01 +00:00
Chunks.h [COFF] Add support for delay loading DLLs for ARM64 2018-09-18 07:22:01 +00:00
Config.h COFF: Add support for /force:multiple option 2018-09-13 22:05:10 +00:00
DLL.cpp [COFF] Support linking to import libraries from GNU binutils 2018-09-21 22:01:06 +00:00
DLL.h [COFF] Support linking to import libraries from GNU binutils 2018-09-21 22:01:06 +00:00
Driver.cpp [COFF] Provide __CTOR_LIST__ and __DTOR_LIST__ symbols for MinGW 2018-09-14 22:26:59 +00:00
Driver.h lld-link: Fix subsystem inference for non-console apps on 32-bit, and fix entry point inference on 32-bit with /nodefaultlib 2018-08-03 12:00:12 +00:00
DriverUtils.cpp lld-link: Remove /msvclto option 2018-08-01 19:00:49 +00:00
ICF.cpp [COFF] When doing automatic dll imports, replace whole .refptr.<var> chunks with __imp_<var> 2018-08-31 07:45:20 +00:00
ICF.h Consistent use of header file for ICF and MarkLive 2018-02-20 22:09:59 +00:00
InputFiles.cpp COFF: Implement safe ICF on rodata using address-significance tables. 2018-08-23 17:44:42 +00:00
InputFiles.h COFF: Implement safe ICF on rodata using address-significance tables. 2018-08-23 17:44:42 +00:00
LTO.cpp Code cleanup in preparation for adding LTO for wasm. NFC. 2018-05-22 20:20:25 +00:00
LTO.h Code cleanup in preparation for adding LTO for wasm. NFC. 2018-05-22 20:20:25 +00:00
MapFile.cpp COFF: Move assignment of section RVAs to assignAddresses(). NFCI. 2018-03-15 21:13:46 +00:00
MapFile.h COFF: Change the /lldmap output format to be more like the ELF linker. 2017-01-14 03:14:46 +00:00
MarkLive.cpp [COFF] When doing automatic dll imports, replace whole .refptr.<var> chunks with __imp_<var> 2018-08-31 07:45:20 +00:00
MarkLive.h Consistent use of header file for ICF and MarkLive 2018-02-20 22:09:59 +00:00
MinGW.cpp [COFF] Fix the name mangling of a function in the autoexport exclusion list 2018-09-18 07:22:05 +00:00
MinGW.h [COFF] Allow exporting all symbols from system libraries specfied with -wholearchive: 2018-09-04 20:56:56 +00:00
Options.td COFF: Add support for /force:multiple option 2018-09-13 22:05:10 +00:00
PDB.cpp lld-link: Set PDB GUID to hash of PDB contents instead of to a random byte sequence. 2018-09-15 18:37:22 +00:00
PDB.h lld-link: Set PDB GUID to hash of PDB contents instead of to a random byte sequence. 2018-09-15 18:37:22 +00:00
README.md Update the documents of the new LLD. 2016-03-12 06:06:40 +00:00
SymbolTable.cpp [COFF] Fix a block with incorrect indentation. NFC. 2018-09-18 07:21:55 +00:00
SymbolTable.h [COFF] don't mark lazy symbols as used in regular objects 2018-09-06 20:23:56 +00:00
Symbols.cpp [COFF] When doing automatic dll imports, replace whole .refptr.<var> chunks with __imp_<var> 2018-08-31 07:45:20 +00:00
Symbols.h fix comment typo 2018-08-27 14:22:25 +00:00
Writer.cpp [COFF] Support linking to import libraries from GNU binutils 2018-09-21 22:01:06 +00:00
Writer.h [COFF] Provide __CTOR_LIST__ and __DTOR_LIST__ symbols for MinGW 2018-09-14 22:26:59 +00:00

README.md

See docs/NewLLD.rst