megadrive_test1

diff 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
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/megadrive.ldscript	Mon Jan 30 08:21:53 2017 +0200
     1.3 @@ -0,0 +1,44 @@
     1.4 +OUTPUT_ARCH(m68k)
     1.5 +
     1.6 +MEMORY
     1.7 +{
     1.8 +	rom : ORIGIN = 0x00000000, LENGTH = 0x00a00000
     1.9 +	ram : ORIGIN = 0x00ff0000, LENGTH = 0x00010000
    1.10 +}
    1.11 +
    1.12 +PROVIDE (_stacktop = 0x01000000);
    1.13 +
    1.14 +SECTIONS {
    1.15 +	/* ---- start of ROM ---- */
    1.16 +	/* .vect section is used to place the m68k exception vectors at the
    1.17 +	 * beginning of the address space
    1.18 +	 */
    1.19 +	.vect : { KEEP (* (.vect)); } >rom
    1.20 +	/* .romhdr section is used to place the SEGA ROM header at 0x100 */
    1.21 +	. = 0x100;
    1.22 +	.romhdr : { KEEP (* (.romhdr)); } >rom
    1.23 +	.text : { * (.text); } >rom
    1.24 +	.rodata : { * (.rodata); } >rom
    1.25 +
    1.26 +	/* place the load address of the .data section after .rodata */
    1.27 +	_data_lma = .;
    1.28 +	_rom_end = _data_lma + _data_size;
    1.29 +
    1.30 +	/* ---- start of RAM ---- */
    1.31 +	. = 0xff0000;
    1.32 +	/* place the .data section at the start of RAM */
    1.33 +	.data : AT (_data_lma) {
    1.34 +		_data_start = .;
    1.35 +		* (.data);
    1.36 +		_data_end = .;
    1.37 +	} >ram
    1.38 +	_data_size = SIZEOF(.data);
    1.39 +
    1.40 +	/* place the .bss section at the end */
    1.41 +	.bss : {
    1.42 +		_bss_start = .;
    1.43 +		* (.bss);
    1.44 +		_bss_end = .;
    1.45 +	} >ram
    1.46 +	_bss_size = SIZEOF(.bss);
    1.47 +}