1 /*****************************************************************************\
2 *** MSVC Linker Script File -- Sections specifications & layout ***
3 \*****************************************************************************/
6 #error This file must be used only with the MSVC compiler and linker.
9 #if defined(__LINKER__)
10 /*********************************\
11 ** Linker response file **
12 \*********************************/
17 #elif !defined(_USE_ML)
18 /*********************************\
19 ** C Linker #pragma directives **
20 \*********************************/
23 * Notes about automatic LINK.EXE behaviour that cannot be changed:
25 * - If a .data section is present, the .bss section is appended to it in case
26 * both of these have either Initialized or Uninitialized data (which is the
27 * case, unless one has manually modified the attributes).
29 * - If the /DRIVER flag is NOT used, and if both the .rdata and the .edata
30 * sections (read-only data and exports, respectively) have the same
31 * attributes, the .edata section is appended to the .rdata section.
32 * Otherwise they are kept separated, unless an explicit /MERGE is used.
35 #pragma comment(linker, "/SECTION:.text,ERW /SECTION:.data,RW /MERGE:INIT=.text /MERGE:.edata=.rdata")
40 #if defined(_USE_ML) // && !defined(__LINKER__)
41 /************************\
43 \************************/
48 #pragma bss_seg(".bss")
49 // __declspec(allocate(".bss"))
53 _BSS1 SEGMENT 'BSS' ALIAS('.bss')
60 #pragma bss_seg(".bss$ZZZ")
61 // __declspec(allocate(".bss$ZZZ"))
65 _BSS2 SEGMENT 'BSS' ALIAS('.bss$ZZZ')
73 #elif !defined(__LINKER__)
74 /************************\
76 \************************/