1.1 --- a/lib/payload.ld Sat Oct 27 23:38:27 2018 +0200
1.2 +++ b/lib/payload.ld Sat Oct 27 23:44:14 2018 +0200
1.3 @@ -34,16 +34,26 @@
1.4
1.5 .boot : { *(.boot*) } > kseg0_boot_mem AT > physical_boot_mem
1.6
1.7 - /* Exception/interrupt vectors and general program code. */
1.8 + .flash : {
1.9 +
1.10 + /* Exception/interrupt vectors and general program code. */
1.11
1.12 - .vectors : { *(.vectors*) } > kseg0_program_mem AT > physical_program_mem
1.13 + *(.vectors*)
1.14
1.15 - .got : {
1.16 + /* Global offset table. */
1.17 +
1.18 _gp = ALIGN(16);
1.19 *(.got*)
1.20 - } > kseg0_program_mem AT > physical_program_mem
1.21 +
1.22 + /* Program code. */
1.23 +
1.24 + *(.text*)
1.25
1.26 - .text : { *(.text*) } > kseg0_program_mem AT > physical_program_mem
1.27 + /* Store constant data in program memory. */
1.28 +
1.29 + *(.rodata*)
1.30 +
1.31 + } > kseg0_program_mem AT > physical_program_mem
1.32
1.33 /* Reserve space at the bottom of RAM for the IRQ stack. */
1.34
1.35 @@ -51,19 +61,6 @@
1.36 . += IRQ_STACK_SIZE;
1.37 } > kseg0_data_mem AT > physical_data_mem
1.38
1.39 - /* Add other data after the IRQ stack. */
1.40 -
1.41 - .bss : {
1.42 - _bss = .;
1.43 - *(.bss*)
1.44 - } > kseg0_data_mem AT > physical_data_mem
1.45 -
1.46 - _bss_size = SIZEOF(.bss);
1.47 -
1.48 - /* Store constant data in program memory. */
1.49 -
1.50 - .rodata : { *(.rodata*) } > kseg0_program_mem AT > physical_program_mem
1.51 -
1.52 /* Store initialised non-constant data in program memory for relocation.
1.53 Employ data memory addresses for generated content. */
1.54
1.55 @@ -75,6 +72,15 @@
1.56 _data_original = LOADADDR(.data) - ORIGIN(physical_program_mem) + ORIGIN(kseg0_program_mem);
1.57 _data_size = SIZEOF(.data);
1.58
1.59 + /* Reserve space for uninitialised data. */
1.60 +
1.61 + .bss : {
1.62 + _bss = .;
1.63 + *(.bss*)
1.64 + } > kseg0_data_mem AT > physical_data_mem
1.65 +
1.66 + _bss_size = SIZEOF(.bss);
1.67 +
1.68 /* Device configuration registers to be flashed. */
1.69
1.70 .devcfg0 : { *(.devcfg0) } > config0 AT > physical_config0