3 /* Align sections to keep PE tools happy */
6 /* Virtual addresses start at 0x20000 */
12 .prefix : AT ( _prefix_pos ) {
16 . = ALIGN ( alignment );
19 _prefix_len = ABSOLUTE ( _eprefix ) - ABSOLUTE ( _prefix );
21 /* Real-mode uninitialised data section */
28 . = ALIGN ( alignment );
31 _bss16_len = ABSOLUTE ( _ebss16 ) - ABSOLUTE ( _bss16 );
34 _payload_pos = ( _prefix_pos + _prefix_len );
35 .payload : AT ( _payload_pos ) {
37 /* Portions that must be accessible in 16-bit modes */
48 /* Portions that need not be accessible in 16-bit modes */
58 . = ALIGN ( alignment );
62 _text16_len = ABSOLUTE ( _etext16 ) - ABSOLUTE ( _text16 );
63 _data16_len = ABSOLUTE ( _edata16 ) - ABSOLUTE ( _data16 );
64 _text_len = ABSOLUTE ( _etext ) - ABSOLUTE ( _text );
65 _data_len = ABSOLUTE ( _edata ) - ABSOLUTE ( _data );
66 _payload_len = ABSOLUTE ( _epayload ) - ABSOLUTE ( _payload );
68 /* bootmgr.exe hardcodes the address 0x30000 for use as a
69 * buffer accessible by real-mode code. We can't fit our
70 * .text, .data, and .bss below this region, so explicitly
71 * place the .bss higher in memory.
73 _forbidden_start = 0x30000;
74 _forbidden_end = 0x40000;
76 /* Uninitialised data section */
79 ASSERT ( ABSOLUTE ( . ) <= ABSOLUTE ( _forbidden_start ),
80 "Binary is too large" );
81 . = ABSOLUTE ( _forbidden_end );
87 . = ALIGN ( alignment );
90 _bss_len = ABSOLUTE ( _ebss ) - ABSOLUTE ( _bss );
92 /* Relocations section */
93 _reloc_pos = ( _payload_pos + _payload_len );
98 _text_total_len = ( _text_len + _text16_len );
99 _data_total_len = ( _data_len + _data16_len );
100 _bss_total_len = ( _bss_len + _bss16_len );
102 /* Symbols required by i386.x86_64 objects */
103 __i386__start = _start;