1.1 --- a/lib/payload.ld Sat Oct 27 17:16:55 2018 +0200
1.2 +++ b/lib/payload.ld Sat Oct 27 21:51:40 2018 +0200
1.3 @@ -37,6 +37,12 @@
1.4 /* Exception/interrupt vectors and general program code. */
1.5
1.6 .vectors : { *(.vectors*) } > kseg0_program_mem AT > physical_program_mem
1.7 +
1.8 + .got : {
1.9 + _gp = ALIGN(16);
1.10 + *(.got*)
1.11 + } > kseg0_program_mem AT > physical_program_mem
1.12 +
1.13 .text : { *(.text*) } > kseg0_program_mem AT > physical_program_mem
1.14
1.15 /* Reserve space at the bottom of RAM for the IRQ stack. */
1.16 @@ -47,15 +53,16 @@
1.17
1.18 /* Add other data after the IRQ stack. */
1.19
1.20 - .bss : { *(.bss*) } > kseg0_data_mem AT > physical_data_mem
1.21 + .bss : {
1.22 + _bss = .;
1.23 + *(.bss*)
1.24 + } > kseg0_data_mem AT > physical_data_mem
1.25 +
1.26 + _bss_size = SIZEOF(.bss);
1.27
1.28 /* Store constant data in program memory. */
1.29
1.30 .rodata : { *(.rodata*) } > kseg0_program_mem AT > physical_program_mem
1.31 - .got : {
1.32 - _gp = ALIGN(16);
1.33 - *(.got*)
1.34 - } > kseg0_program_mem AT > physical_program_mem
1.35
1.36 /* Store initialised non-constant data in program memory for relocation.
1.37 Employ data memory addresses for generated content. */
1.38 @@ -63,7 +70,6 @@
1.39 .data : {
1.40 _data = .;
1.41 *(.data*)
1.42 - _data_end = .;
1.43 } > kseg0_data_mem AT > physical_program_mem
1.44
1.45 _data_original = LOADADDR(.data) - ORIGIN(physical_program_mem) + ORIGIN(kseg0_program_mem);