megadrive_test1
annotate megadrive.ldscript @ 0:909c22dc18d2
initial commit
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 30 Jan 2017 08:21:53 +0200 |
parents | |
children | 9e7f64c4fe7a |
rev | line source |
---|---|
nuclear@0 | 1 OUTPUT_ARCH(m68k) |
nuclear@0 | 2 |
nuclear@0 | 3 MEMORY |
nuclear@0 | 4 { |
nuclear@0 | 5 rom : ORIGIN = 0x00000000, LENGTH = 0x00a00000 |
nuclear@0 | 6 ram : ORIGIN = 0x00ff0000, LENGTH = 0x00010000 |
nuclear@0 | 7 } |
nuclear@0 | 8 |
nuclear@0 | 9 PROVIDE (_stacktop = 0x01000000); |
nuclear@0 | 10 |
nuclear@0 | 11 SECTIONS { |
nuclear@0 | 12 /* ---- start of ROM ---- */ |
nuclear@0 | 13 /* .vect section is used to place the m68k exception vectors at the |
nuclear@0 | 14 * beginning of the address space |
nuclear@0 | 15 */ |
nuclear@0 | 16 .vect : { KEEP (* (.vect)); } >rom |
nuclear@0 | 17 /* .romhdr section is used to place the SEGA ROM header at 0x100 */ |
nuclear@0 | 18 . = 0x100; |
nuclear@0 | 19 .romhdr : { KEEP (* (.romhdr)); } >rom |
nuclear@0 | 20 .text : { * (.text); } >rom |
nuclear@0 | 21 .rodata : { * (.rodata); } >rom |
nuclear@0 | 22 |
nuclear@0 | 23 /* place the load address of the .data section after .rodata */ |
nuclear@0 | 24 _data_lma = .; |
nuclear@0 | 25 _rom_end = _data_lma + _data_size; |
nuclear@0 | 26 |
nuclear@0 | 27 /* ---- start of RAM ---- */ |
nuclear@0 | 28 . = 0xff0000; |
nuclear@0 | 29 /* place the .data section at the start of RAM */ |
nuclear@0 | 30 .data : AT (_data_lma) { |
nuclear@0 | 31 _data_start = .; |
nuclear@0 | 32 * (.data); |
nuclear@0 | 33 _data_end = .; |
nuclear@0 | 34 } >ram |
nuclear@0 | 35 _data_size = SIZEOF(.data); |
nuclear@0 | 36 |
nuclear@0 | 37 /* place the .bss section at the end */ |
nuclear@0 | 38 .bss : { |
nuclear@0 | 39 _bss_start = .; |
nuclear@0 | 40 * (.bss); |
nuclear@0 | 41 _bss_end = .; |
nuclear@0 | 42 } >ram |
nuclear@0 | 43 _bss_size = SIZEOF(.bss); |
nuclear@0 | 44 } |