Fixed (?) issues from PR #129
[legacy-proxmark3.git] / bootrom / ldscript-flash
blobf1bab1494e856cc81c28299efd101350452b0f2b
1 /*
2 -----------------------------------------------------------------------------
3  This code is licensed to you under the terms of the GNU GPL, version 2 or,
4  at your option, any later version. See the LICENSE.txt file for the text of
5  the license.
6 -----------------------------------------------------------------------------
7  Bootrom linker script
8 -----------------------------------------------------------------------------
9 */
11 INCLUDE ../common/ldscript.common
13 PHDRS
15         phase1 PT_LOAD;
16         phase2 PT_LOAD;
17         bss PT_LOAD;
20 ENTRY(flashstart)
21 SECTIONS
23         .bootphase1 : {
24                 *(.startup)
26                 . = ALIGN(4);
27                 _version_information_start = .;
28                 KEEP(*(.version_information));
30                 . = LENGTH(bootphase1) - 0x4;
31                 LONG(_version_information_start);
32         } >bootphase1 :phase1
34         .bootphase2 : {
35                 *(.startphase2)
36                 *(.text)
37                 *(.text.*)
38                 *(.eh_frame)
39                 *(.glue_7)
40                 *(.glue_7t)
41                 *(.rodata)
42                 *(.rodata.*)
43                 *(.data)
44                 *(.data.*)
45                 . = ALIGN(4);
46         } >ram AT>bootphase2 :phase2
48         __bootphase2_src_start__ = LOADADDR(.bootphase2);
49         __bootphase2_start__ = ADDR(.bootphase2);
50         __bootphase2_end__ = __bootphase2_start__ + SIZEOF(.bootphase2);
52         .bss : {
53                 __bss_start__ = .;
54                 *(.bss)
55                 *(.bss.*)
56                 . = ALIGN(4);
57                 __bss_end__ = .;
58         } >ram AT>ram :bss
60         .commonarea (NOLOAD) : {
61                 *(.commonarea)
62         } >commonarea