[0.4.7][SDK/INCLUDE] Fix MSVC x86 warning LNK4078 CORE-18104
authorJoachim Henze <Joachim.Henze@reactos.org>
Sun, 27 Mar 2022 08:28:14 +0000 (10:28 +0200)
committerJoachim Henze <Joachim.Henze@reactos.org>
Sun, 27 Mar 2022 08:28:14 +0000 (10:28 +0200)
commite9154dd63b0f02265b27b64ad08120944ee4ea91
tree5f76e88f0c60243dd24273251ce6438f4a63f8e7
parent6873e14c426ee260f219f661fae25fe154d3e098
[0.4.7][SDK/INCLUDE] Fix MSVC x86 warning LNK4078 CORE-18104

Fix the .code16 macro definition for MASM/ML.

Modify the .code16 macro so that the 16-bit code segment can get a
chance to be correctly merged with other (possibly 32-bit) code
segments, without keeping generating multiple .text segments with
different attributes and generating the corresponding LNK4078 warning.

This fixes the warning when compiling NTOSKRNL on MSVC2010SP1 x86 in dbg config:
"v86.S.obj : warning LNK4078: multiple '.text' sections found with different attributes (C0520040)".

And it even slightly shrinks the size of hal.dll, e.g. for releases/0.4.7 from 1.231.360 to 1.230.848bytes

fix picked from 0.4.12-dev-494-g 0ee02b2c4d04170e0e68eae538da871f47680ddd
sdk/include/asm/asm.inc