llvm-project/lld/ELF
Fangrui Song d3e5b6f753 [ELF] Implement --build-id={md5,sha1} with truncated BLAKE3
--build-id was introduced as "approximation of true uniqueness across all
binaries that might be used by overlapping sets of people". It does not require
the some resistance mentioned below. In practice, people just use --build-id=md5
for 16-byte build ID and --build-id=sha1 for 20-byte build ID.

BLAKE3 has 256-bit key length, which provides 128-bit security against
(second-)preimage, collision, and differentiability attacks. Its portable
implementation is fast. It additionally provides Arm Neon/AVX2/AVX-512. Just
implement --build-id={md5,sha1} with truncated BLAKE3.

Linking clang 14 RelWithDebInfo with --threads=8 on a Skylake CPU:

* 1.13x as fast with --build-id=md5
* 1.15x as fast with --build-id=sha1

--threads=4 on Apple m1:

* 1.25x as fast with --build-id=md5
* 1.17x as fast with --build-id=sha1

Reviewed By: ikudrin

Differential Revision: https://reviews.llvm.org/D121531
2022-03-24 11:31:39 -07:00
..
Arch [AMDGPU][LLD] Adding support for ABI version 5 option 2022-03-23 01:22:37 -07:00
AArch64ErrataFix.cpp [ELF] Don't rely on Symbols.h's transitive inclusion of InputFiles.h. NFC 2022-02-23 20:44:34 -08:00
AArch64ErrataFix.h [ELF] AArch64ErrataFix: replace std::map with DenseMap. NFC 2022-02-07 22:02:25 -08:00
ARMErrataFix.cpp [ELF] Don't rely on Symbols.h's transitive inclusion of InputFiles.h. NFC 2022-02-23 20:44:34 -08:00
ARMErrataFix.h [ELF] Clean up headers. NFC 2022-02-07 21:53:34 -08:00
CMakeLists.txt [ELF] Parallelize --compress-debug-sections=zlib 2022-01-25 10:29:04 -08:00
CallGraphSort.cpp [ELF] Don't rely on Symbols.h's transitive inclusion of InputFiles.h. NFC 2022-02-23 20:44:34 -08:00
CallGraphSort.h
Config.h Reland "[ELF] Enable new passmanager plugin support for LTO" 2022-03-24 16:29:18 +01:00
DWARF.cpp [ELF] Clean up headers. NFC 2022-02-07 21:53:34 -08:00
DWARF.h [ELF] --gdb-index: skip SHF_GROUP .debug_info 2020-08-13 09:11:01 -07:00
Driver.cpp Reland "[ELF] Enable new passmanager plugin support for LTO" 2022-03-24 16:29:18 +01:00
Driver.h [ELF] Change global variable backwardReferences to a LinkerDriver member variable. NFC 2022-02-27 20:33:28 +00:00
DriverUtils.cpp [ELF] Clean up headers. NFC 2022-02-07 21:53:34 -08:00
EhFrame.cpp [ELF] Replace uncompressed InputSectionBase::data() with rawData. NFC 2022-02-21 00:39:26 -08:00
EhFrame.h [ELF] Simplify/optimize EhInputSection::split 2022-01-18 17:03:23 -08:00
ICF.cpp [ELF] Don't use multiple inheritance for OutputSection. NFC 2022-03-08 11:23:42 -08:00
ICF.h
InputFiles.cpp [ELF] Move invalid binding diagnostic from initializeSymbols to postParse 2022-03-16 00:31:29 -07:00
InputFiles.h Reland D119909 [ELF] Parallelize initializeLocalSymbols 2022-03-04 19:00:10 -08:00
InputSection.cpp [ELF] Inline InputSection::getParent. NFC 2022-03-08 11:26:12 -08:00
InputSection.h [ELF] Inline InputSection::getParent. NFC 2022-03-08 11:26:12 -08:00
LTO.cpp Reland "[ELF] Enable new passmanager plugin support for LTO" 2022-03-24 16:29:18 +01:00
LTO.h [Coding style change] Rename variables so that they start with a lowercase letter 2019-07-10 05:00:37 +00:00
LinkerScript.cpp [ELF] Don't use multiple inheritance for OutputSection. NFC 2022-03-08 11:23:42 -08:00
LinkerScript.h [ELF] Don't use multiple inheritance for OutputSection. NFC 2022-03-08 11:23:42 -08:00
MapFile.cpp [ELF] Don't use multiple inheritance for OutputSection. NFC 2022-03-08 11:23:42 -08:00
MapFile.h [ELF] Move --print-archive-stats= and --why-extract= beside --warn-backrefs report 2022-02-27 20:23:09 +00:00
MarkLive.cpp [ELF] Don't rely on Symbols.h's transitive inclusion of InputFiles.h. NFC 2022-02-23 20:44:34 -08:00
MarkLive.h
Options.td Reland "[ELF] Enable new passmanager plugin support for LTO" 2022-03-24 16:29:18 +01:00
OutputSections.cpp [ELF] Don't use multiple inheritance for OutputSection. NFC 2022-03-08 11:23:42 -08:00
OutputSections.h [ELF] Don't use multiple inheritance for OutputSection. NFC 2022-03-08 11:23:42 -08:00
README.md
Relocations.cpp [ELF] Move section assignment from initializeSymbols to postParse 2022-03-15 19:24:41 -07:00
Relocations.h [ELF] Clean up headers. NFC 2022-02-07 21:53:34 -08:00
ScriptLexer.cpp [ELF] Clean up headers. NFC 2022-02-07 21:53:34 -08:00
ScriptLexer.h [ELF] Clean up headers. NFC 2022-02-07 21:53:34 -08:00
ScriptParser.cpp [ELF] Don't use multiple inheritance for OutputSection. NFC 2022-03-08 11:23:42 -08:00
ScriptParser.h [ELF] Clean up headers. NFC 2022-02-07 21:53:34 -08:00
SymbolTable.cpp [ELF] Move isUsedInRegularObj assignment from ctor to call sites. NFC 2022-02-23 21:32:50 -08:00
SymbolTable.h [ELF] Symbols.h: remove #include "InputFiles.h" 2022-02-23 21:36:45 -08:00
Symbols.cpp [ELF] Move section assignment from initializeSymbols to postParse 2022-03-15 19:24:41 -07:00
Symbols.h [ELF] Move section assignment from initializeSymbols to postParse 2022-03-15 19:24:41 -07:00
SyntheticSections.cpp [ELF] Use endianness-aware read32 to avoid dispatch. NFC 2022-03-15 23:51:11 -07:00
SyntheticSections.h [ELF] Inline ARMExidxSyntheticSection::classof. NFC 2022-03-15 23:41:30 -07:00
Target.cpp [ELF] De-template getErrorPlace. NFC 2022-01-29 23:05:54 -08:00
Target.h [ELF] Clean up headers. NFC 2022-02-07 21:53:34 -08:00
Thunks.cpp [ELF] Don't rely on Symbols.h's transitive inclusion of InputFiles.h. NFC 2022-02-23 20:44:34 -08:00
Thunks.h [lld] Add missing includes (NFC) 2021-06-03 18:55:18 +02:00
Writer.cpp [ELF] Implement --build-id={md5,sha1} with truncated BLAKE3 2022-03-24 11:31:39 -07:00
Writer.h [ELF] Clean up headers. NFC 2022-02-07 21:53:34 -08:00

README.md

See docs/NewLLD.rst