megadrive_test1

view megadrive.ldscript @ 1:9e7f64c4fe7a

fixed missing defines when building romhdr.S
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 30 Jan 2017 08:29:05 +0200
parents 909c22dc18d2
children 54739a11be66
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 _data_lma = .;
25 _rom_end = _data_lma + _data_size;
27 /* ---- start of RAM ---- */
28 . = 0xff0000;
29 /* place the .data section at the start of RAM */
30 .data : AT (_data_lma) {
31 _data_start = .;
32 * (.data);
33 _data_end = .;
34 } >ram
35 _data_size = SIZEOF(.data);
37 /* place the .bss section at the end */
38 .bss : {
39 _bss_start = .;
40 * (.bss);
41 _bss_end = .;
42 } >ram
43 _bss_size = SIZEOF(.bss);
44 }