llvm-project/lld/COFF
Martin Storsjö 4c3b74b7f5 [LLD] [COFF] Order .debug_* sections at the end, to avoid leaving gaps if stripped
So far, we sort all discardable sections at the end, with only some
extra logic to make sure that the .reloc section is at the start
of that group of sections. But if there are other discardable
sections, other than .reloc, they must also be ordered before
.debug_* sections, to avoid leaving gaps if the executable is
stripped.

(Stripping executables doesn't remove all discardable sections,
only the ones named .debug_*).

Rust binaries seem to include a .rmeta section, which is marked
discardable. This fixes stripping such binaries if built with
dwarf debug info included.

This fixes issues observed in MSYS2 in
https://github.com/msys2/MINGW-packages/pull/10555.

Differential Revision: https://reviews.llvm.org/D120805
2022-03-03 10:08:51 +02:00
..
CMakeLists.txt Reland: Make lld-link work in a non-MSVC shell, add /winsysroot: 2022-02-16 09:22:39 -05:00
COFFLinkerContext.cpp Reland "[LLD] Remove global state in lld/COFF" after fixing asan and msan test failures 2021-09-17 17:18:42 -07:00
COFFLinkerContext.h Re-land [LLD] Remove global state in lldCommon 2022-01-20 14:53:26 -05:00
CallGraphSort.cpp Reland "[LLD] Remove global state in lld/COFF" after fixing asan and msan test failures 2021-09-17 17:18:42 -07:00
CallGraphSort.h Reland "[LLD] Remove global state in lld/COFF" after fixing asan and msan test failures 2021-09-17 17:18:42 -07:00
Chunks.cpp Revert "Rename llvm::array_lengthof into llvm::size to match std::size from C++17" 2022-01-26 16:55:53 +01:00
Chunks.h Reland "[LLD] Remove global state in lld/COFF" after fixing asan and msan test failures 2021-09-17 17:18:42 -07:00
Config.h [LLD][COFF] Support GNU style == aliases 2022-01-19 14:22:13 +01:00
DLL.cpp Re-land [LLD] Remove global state in lldCommon 2022-01-20 14:53:26 -05:00
DLL.h Reland "[LLD] Remove global state in lld/COFF" after fixing asan and msan test failures 2021-09-17 17:18:42 -07:00
DebugTypes.cpp lld: const-qualify iterations through VarStreamArray, NFC 2021-11-12 14:29:49 -08:00
DebugTypes.h Reland "[LLD] Remove global state in lld/COFF" after fixing asan and msan test failures 2021-09-17 17:18:42 -07:00
Driver.cpp Reland: Make lld-link work in a non-MSVC shell, add /winsysroot: 2022-02-16 09:22:39 -05:00
Driver.h Reland: Make lld-link work in a non-MSVC shell, add /winsysroot: 2022-02-16 09:22:39 -05:00
DriverUtils.cpp Re-land [LLD] Remove global state in lldCommon 2022-01-20 14:53:26 -05:00
ICF.cpp Reland "[LLD] Remove global state in lld/COFF" after fixing asan and msan test failures 2021-09-17 17:18:42 -07:00
ICF.h Reland "[LLD] Remove global state in lld/COFF" after fixing asan and msan test failures 2021-09-17 17:18:42 -07:00
InputFiles.cpp Re-land [LLD] Remove global state in lldCommon 2022-01-20 14:53:26 -05:00
InputFiles.h [lld-link] Replace LazyObjFile with lazy ObjFile/BitcodeFile 2022-01-04 15:11:44 -08:00
LLDMapFile.cpp Reland "[LLD] Remove global state in lld/COFF" after fixing asan and msan test failures 2021-09-17 17:18:42 -07:00
LLDMapFile.h Reland "[LLD] Remove global state in lld/COFF" after fixing asan and msan test failures 2021-09-17 17:18:42 -07:00
LTO.cpp Re-land [LLD] Remove global state in lldCommon 2022-01-20 14:53:26 -05:00
LTO.h Reland "[LLD] Remove global state in lld/COFF" after fixing asan and msan test failures 2021-09-17 17:18:42 -07:00
MapFile.cpp Reland "[LLD] Remove global state in lld/COFF" after fixing asan and msan test failures 2021-09-17 17:18:42 -07:00
MapFile.h Reland "[LLD] Remove global state in lld/COFF" after fixing asan and msan test failures 2021-09-17 17:18:42 -07:00
MarkLive.cpp Reland "[LLD] Remove global state in lld/COFF" after fixing asan and msan test failures 2021-09-17 17:18:42 -07:00
MarkLive.h Reland "[LLD] Remove global state in lld/COFF" after fixing asan and msan test failures 2021-09-17 17:18:42 -07:00
MinGW.cpp Re-land [LLD] Remove global state in lldCommon 2022-01-20 14:53:26 -05:00
MinGW.h Reland "[LLD] Remove global state in lld/COFF" after fixing asan and msan test failures 2021-09-17 17:18:42 -07:00
Options.td Reland: Make lld-link work in a non-MSVC shell, add /winsysroot: 2022-02-16 09:22:39 -05:00
PDB.cpp Cleanup llvm/DebugInfo/PDB headers 2022-02-23 10:31:34 +01:00
PDB.h Reland "[LLD] Remove global state in lld/COFF" after fixing asan and msan test failures 2021-09-17 17:18:42 -07:00
README.md
SymbolTable.cpp Reland: Make lld-link work in a non-MSVC shell, add /winsysroot: 2022-02-16 09:22:39 -05:00
SymbolTable.h [lld-link] Replace LazyObjFile with lazy ObjFile/BitcodeFile 2022-01-04 15:11:44 -08:00
Symbols.cpp [lld] Add support for other demanglers other than Itanium 2022-01-05 03:25:41 +00:00
Symbols.h [lld-link] Replace LazyObjFile with lazy ObjFile/BitcodeFile 2022-01-04 15:11:44 -08:00
TypeMerger.h Reland "[LLD] Remove global state in lld/COFF" after fixing asan and msan test failures 2021-09-17 17:18:42 -07:00
Writer.cpp [LLD] [COFF] Order .debug_* sections at the end, to avoid leaving gaps if stripped 2022-03-03 10:08:51 +02:00
Writer.h Reland "[LLD] Remove global state in lld/COFF" after fixing asan and msan test failures 2021-09-17 17:18:42 -07:00

README.md

See docs/NewLLD.rst