Port rombios32 code from bochs-bios.
[seabios.git] / src / rombios32.lds.S
1 // Linker definitions for 32bit code
2 //
3 // Copyright (C) 2008  Kevin O'Connor <kevin@koconnor.net>
4 // Copyright (C) 2002  MandrakeSoft S.A.
5 //
6 // This file may be distributed under the terms of the GNU GPLv3 license.
7
8 #include "config.h"
9 #include "../out/rom16.offset.auto.h"
10
11 OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
12 OUTPUT_ARCH("i386")
13 ENTRY(_start);
14 SECTIONS
15 {
16         . = (OFFSET_bios16c_end | 0xf0000);
17         . = ALIGN(16);
18         _text32_start = . ;
19         .text     : { *(.text)    }
20         .rodata    : { *(.rodata) }
21         .data     : { *(.data)    }
22         // XXX - should change code so it doesn't require global variables.
23         . = 0x00040000;
24         __bss_start = . ;
25         .bss      : { *(.bss) *(COMMON) }
26         _end = . ;
27         __call16_from32 = (0xf0000 | OFFSET___call16_from32) ;
28         /DISCARD/ : { *(.stab)
29                      *(.stabstr)
30                      *(.comment)
31                      *(.note)
32                   }
33 }