]> rtime.felk.cvut.cz Git - jailhouse.git/blob - inmates/lib/x86/inmate.lds
inmates: Define entry point in linker script
[jailhouse.git] / inmates / lib / x86 / inmate.lds
1 /*
2  * Jailhouse, a Linux-based partitioning hypervisor
3  *
4  * Copyright (c) Siemens AG, 2013
5  *
6  * Authors:
7  *  Jan Kiszka <jan.kiszka@siemens.com>
8  *
9  * This work is licensed under the terms of the GNU GPL, version 2.  See
10  * the COPYING file in the top-level directory.
11  */
12
13 /*
14  * Layout:
15  *  0x000000..        : heap (not configured here)
16  *          ..0x0e0000: stack
17  *  0x0e0000..0x0effff: bss
18  *  0x0f0000..0x0fffef: startup code, text, rodata, data
19  *  0x0ffff0..0x0fffff: startup code (boot address)
20  *  0x100000..0x100fff: communication region (not configured here)
21  */
22 SECTIONS
23 {
24         /* 16-bit sections */
25         . = 0;
26         .startup        : { *(.startup) }
27
28         . = 0xfff0;
29         .boot           : {
30                 *(.boot)
31                 . = ALIGN(16);
32         }
33
34         /* 32/64-bit sections */
35         . = 0xe0000;
36         stack_top = .;
37         bss_start = .;
38         .bss            : {
39                 *(.bss)
40                 . = ALIGN(8);
41         }
42         bss_dwords = SIZEOF(.bss) / 4;
43         bss_qwords = SIZEOF(.bss) / 8;
44
45         . = 0xf0000 + SIZEOF(.startup);
46         .text           : AT (ADDR(.text) & 0xffff) {
47                 *(.text)
48         }
49
50         . = ALIGN(16);
51         .rodata         : AT (ADDR(.rodata) & 0xffff) {
52                 *(.rodata)
53         }
54
55         . = ALIGN(16);
56         .data           : AT (ADDR(.data) & 0xffff) {
57                 *(.data)
58         }
59
60         /DISCARD/ : {
61                 *(.eh_frame*)
62         }
63 }
64
65 ENTRY(__reset_entry)