llvm-project/lld/COFF
Nico Weber 0bd2d304e6 lld-link: Set PDB GUID to hash of PDB contents instead of to a random byte sequence.
Previously, lld-link would use a random byte sequence as the PDB GUID. Instead,
use a hash of the PDB file contents.

To not disturb llvm-pdbutil pdb2yaml, the hash generation is an opt-in feature
on InfoStreamBuilder and ldb/COFF/PDB.cpp always sets it.

Since writing the PDB computes this ID which also goes in the exe, the PDB
writing code now must be called before writeBuildId(). writeBuildId() for that
reason is no longer included in the "Code Layout" timer.

Since the PDB GUID is now a function of the PDB contents, the PDB Age is always
set to 1. There was a long comment above loadExistingBuildId (now gone) about
how not changing the GUID and only incrementing the age was important, but
according to the discussion in PR35914 that comment was incorrect.

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

llvm-svn: 342334
2018-09-15 18:37:22 +00:00
..
CMakeLists.txt Merge {COFF,ELF}/Strings.cpp to Common/Strings.cpp. 2018-02-28 17:38:19 +00:00
Chunks.cpp [COFF] Provide __CTOR_LIST__ and __DTOR_LIST__ symbols for MinGW 2018-09-14 22:26:59 +00:00
Chunks.h [COFF] Provide __CTOR_LIST__ and __DTOR_LIST__ symbols for MinGW 2018-09-14 22:26:59 +00:00
Config.h COFF: Add support for /force:multiple option 2018-09-13 22:05:10 +00:00
DLL.cpp Consistent (non) use of empty lines in include blocks 2018-02-20 21:53:18 +00:00
DLL.h COFF: Process /merge flag as we create output sections. 2018-04-07 00:46:55 +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] Allow exporting all symbols from system libraries specfied with -wholearchive: 2018-09-04 20:56:56 +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 lld-link: print demangled symbol names for "undefined symbol" diagnostics 2018-09-15 18:27:09 +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 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
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