VS2022 Link – Prevent custom section from being removed?
Summary This postmortem analyzes a subtle Visual Studio 2022 linker behavior where a custom section declared with #pragma section and __declspec(allocate) is silently merged or discarded, even when the symbol is explicitly forced into the link via /INCLUDE. The engineer expected a .sbat section to appear in the final binary, but the linker optimized it … Read more