megadrive_test2

view megadrive.ldscript @ 0:ce1b05082ac4

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