microsoft / SizeBench

SizeBench is a binary size investigation tool for Windows
MIT License
103 stars 14 forks source link

The incremental linking detection could be made more accurate #10

Closed dmachaj closed 1 year ago

dmachaj commented 2 years ago

Describe the bug SizeBench will fail to analyze a binary if it thinks incremental linking was used. Some sets of linker options will preclude incremental linking but SizeBench doesn't realize this. The result is that it will reject analysis of a binary that would otherwise be compatible.

This change to BinSkim encodes more of the incremental linking rules in code and could serve as a good reference: https://github.com/microsoft/binskim/pull/667.

The official docs are here: https://docs.microsoft.com/en-us/cpp/build/reference/incremental-link-incrementally?view=msvc-170#remarks.