megadrive_test1
diff megadrive.ldscript @ 3:54739a11be66
- .data copy and .bss clearing
- also made sure .data and .bss start and end markers are dword-aligned to make
sure I can copy 4bytes at a time
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Tue, 31 Jan 2017 07:11:17 +0200 |
parents | 9e7f64c4fe7a |
children |
line diff
1.1 --- a/megadrive.ldscript Mon Jan 30 16:57:51 2017 +0200 1.2 +++ b/megadrive.ldscript Tue Jan 31 07:11:17 2017 +0200 1.3 @@ -21,23 +21,26 @@ 1.4 .rodata : { * (.rodata); } >rom 1.5 1.6 /* place the load address of the .data section after .rodata */ 1.7 + . = ALIGN(4); 1.8 _data_lma = .; 1.9 _rom_end = _data_lma + _data_size; 1.10 1.11 /* ---- start of RAM ---- */ 1.12 . = 0xff0000; 1.13 /* place the .data section at the start of RAM */ 1.14 - .data : AT (_data_lma) { 1.15 + .data ALIGN(4): AT (_data_lma) { 1.16 _data_start = .; 1.17 * (.data); 1.18 + . = ALIGN(4); 1.19 _data_end = .; 1.20 } >ram 1.21 _data_size = SIZEOF(.data); 1.22 1.23 /* place the .bss section at the end */ 1.24 - .bss : { 1.25 + .bss ALIGN(4): { 1.26 _bss_start = .; 1.27 * (.bss); 1.28 + . = ALIGN(4); 1.29 _bss_end = .; 1.30 } >ram 1.31 _bss_size = SIZEOF(.bss);