1/*
2 * Copyright 2014, General Dynamics C4 Systems
3 *
4 * This software may be distributed and modified according to the terms of
5 * the GNU General Public License version 2. Note that NO WARRANTY is provided.
6 * See "LICENSE_GPLv2.txt" for details.
7 *
8 * @TAG(GD_GPL)
9 */
10
11ENTRY(_start)
12
13/* WARNING: constants also defined in plat/machine/hardware.h */
14KERNEL_BASE   = 0xe0000000;
15PHYS_BASE     = 0x40000000;
16KERNEL_OFFSET = KERNEL_BASE - PHYS_BASE;
17
18SECTIONS
19{
20    . = KERNEL_BASE;
21
22    .boot . : AT(ADDR(.boot) - KERNEL_OFFSET)
23    {
24        *(.boot.text)
25        *(.boot.rodata)
26        *(.boot.data)
27        . = ALIGN(64K);
28    }
29
30    ki_boot_end = .;
31    
32    .text . : AT(ADDR(.text) - KERNEL_OFFSET)
33    {
34        /* Sit inside a large frame */
35        . = ALIGN(64K);
36        *(.vectors)
37
38        /* Fastpath code */
39        *(.vectors.fastpath_call)
40        *(.vectors.fastpath_reply_recv)
41        *(.vectors.text)
42
43        /* Anything else that should be in the vectors page. */
44        *(.vectors.*)
45
46        /* Hopefully all that fits into 4K! */
47
48        /* Standard kernel */
49        *(.text)
50    }
51
52    .rodata . : AT(ADDR(.rodata) - KERNEL_OFFSET)
53    {
54        *(.rodata)
55        *(.rodata.*)
56    }
57
58    .data . : AT(ADDR(.data) - KERNEL_OFFSET)
59    {
60        *(.data)
61    }
62
63    .bss . : AT(ADDR(.bss) - KERNEL_OFFSET)
64    {
65        *(.bss)
66
67        /* 4k breakpoint stack */
68        _breakpoint_stack_bottom = .;
69        . = . + 4K;
70        _breakpoint_stack_top = .;
71        
72        /* large data such as the globals frame and global PD */
73        *(.bss.aligned)
74    }
75
76    . = ALIGN(4K);
77    ki_end = .;
78
79    /DISCARD/ :
80    {
81        *(.note.gnu.build-id)
82        *(.comment)
83    }
84}
85