Only re-compile version.c as often as necessary
[proxmark3-svn] / bootrom / ldscript-flash
1 INCLUDE ../common/ldscript.common
2
3 ENTRY(flashstart)
4 SECTIONS
5 {
6 . = 0;
7
8 .bootphase1 : {
9 *(.startup)
10 *(.bootphase1)
11
12 /* It seems to be impossible to flush align a section at the
13 end of a memory segment. Instead, we'll put the version_information
14 wherever the linker wants it, and then put a pointer to the start
15 of the version information at the end of the section.
16 -- Henryk Plötz <henryk@ploetzli.ch> 2009-08-28 */
17
18 _version_information_start = ABSOLUTE(.);
19 *(.version_information);
20
21 /* Why doesn't this work even though _bootphase1_version_pointer = 0x1001fc?
22 . = _bootphase1_version_pointer - ORIGIN(bootphase1); */
23 /* This works, apparently it fools the linker into accepting an absolute address */
24 . = _bootphase1_version_pointer - ORIGIN(bootphase1) + ORIGIN(bootphase1);
25 LONG(_version_information_start)
26 } >bootphase1
27
28 .bootphase2 : {
29 __bootphase2_start__ = .;
30 *(.startphase2)
31 *(.text)
32 *(.glue_7)
33 *(.glue_7t)
34 *(.rodata)
35 *(.data)
36 . = ALIGN( 32 / 8 );
37 __bootphase2_end__ = .;
38 } >ram AT>bootphase2
39
40 .bss : {
41 __bss_start__ = .;
42 *(.bss)
43 } >ram
44
45 . = ALIGN( 32 / 8 );
46 __bss_end__ = .;
47 }
Impressum, Datenschutz