]> rtime.felk.cvut.cz Git - jailhouse.git/blob - inmates/lib/x86/inmate.lds
2ebfcbe79a1207066f7e9d70ccb2c1df4a04f0b5
[jailhouse.git] / inmates / lib / x86 / inmate.lds
1 /*
2  * Jailhouse, a Linux-based partitioning hypervisor
3  *
4  * Copyright (c) Siemens AG, 2013-2016
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: command line, 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         . = 0;
25         .cmdline        : {
26                 cmdline = 0xf0000; /* adjust relocation address of variable */
27                 *(.cmdline)
28                 BYTE(0); /* empty string in case no buffer is provided */
29         }
30
31         /* 16-bit sections */
32         .startup        : { *(.startup) }
33
34         . = 0xfff0;
35         .boot           : {
36                 *(.boot)
37                 . = ALIGN(16);
38         }
39
40         /* 32/64-bit sections */
41         . = 0xe0000;
42         stack_top = .;
43         bss_start = .;
44         .bss            : {
45                 *(.bss)
46                 . = ALIGN(8);
47         }
48         bss_dwords = SIZEOF(.bss) / 4;
49         bss_qwords = SIZEOF(.bss) / 8;
50
51         . = 0xf0000 + ADDR(.startup) + SIZEOF(.startup);
52         .text           : AT (ADDR(.text) & 0xffff) {
53                 *(.text)
54         }
55
56         . = ALIGN(16);
57         .rodata         : AT (ADDR(.rodata) & 0xffff) {
58                 *(.rodata)
59         }
60
61         . = ALIGN(16);
62         .data           : AT (ADDR(.data) & 0xffff) {
63                 *(.data)
64         }
65
66         . = ALIGN(16);
67         .bench-array : AT (ADDR(.data) + SIZEOF(.data)) {
68                 *(.bench-array)
69         }
70
71         /DISCARD/ : {
72                 *(.eh_frame*)
73         }
74 }
75
76 ENTRY(__reset_entry)