blob: d05fdd186144631ea1b60431a5a455fa0affd2cf [file] [log] [blame]
Furquan Shaikh2af76f42014-04-28 16:39:40 -07001/*
2 * Memory map:
3 *
4 * CONFIG_ROMSTAGE_BASE : text segment
5 * : rodata segment
6 * : data segment
7 * : bss segment
8 * : stack
9 * : heap
10 */
11/*
12 * Bootstrap code for the STPC Consumer
13 * Copyright (c) 1999 by Net Insight AB. All Rights Reserved.
14 */
15
16/*
17 * Written by Johan Rydberg, based on work by Daniel Kahlin.
18 * Rewritten by Eric Biederman
19 * 2005.12 yhlu add ramstage cross the vga font buffer handling
20 */
21
22/* We use ELF as output format. So that we can debug the code in some form. */
23/*
24 INCLUDE ldoptions
25 */
26
27/* We use ELF as output format. So that we can debug the code in some form. */
28OUTPUT_FORMAT("elf64-littleaarch64", "elf64-littleaarch64", "elf64-littleaarch64")
29OUTPUT_ARCH(aarch64)
30INCLUDE ldoptions
31
32PHDRS
33{
34 to_load PT_LOAD;
35}
36
37ENTRY(stage_entry)
38
39SECTIONS
40{
41 . = CONFIG_ROMSTAGE_BASE;
42
43 .romtext . : {
44 _start = .;
45 *(.text.stage_entry.aarch64);
46 *(.text.startup);
47 *(.text);
48 *(.text.*);
49 } : to_load
50
51 .romdata . : {
52 *(.rodata);
53 *(.rodata.*);
54 *(.machine_param);
55 *(.data);
56 *(.data.*);
57 . = ALIGN(8);
58 _erom = .;
59 }
60
61 __image_copy_end = .;
62
63 /* bss does not contain data, it is just a space that should be zero
64 * initialized on startup. (typically uninitialized global variables)
65 * crt0.S fills between _bss and _ebss with zeroes.
66 */
67 .bss . : {
68 . = ALIGN(8);
69 _bss = .;
70 *(.bss)
71 *(.bss.*)
72 *(.sbss)
73 *(.sbss.*)
74 _ebss = .;
75 }
76
77 _end = .;
78
79 preram_cbmem_console = CONFIG_CBMEM_CONSOLE_PRERAM_BASE;
80
81 /* Discard the sections we don't need/want */
82 /DISCARD/ : {
83 *(.comment)
84 *(.note)
85 *(.comment.*)
86 *(.note.*)
87 *(.eh_frame);
88 }
89}