ENTRY(_start)

MEMORY
{
    rom(rx): ORIGIN = 0173000, LENGTH = 512
    ram(rwx): ORIGIN = 0, LENGTH = 64k
}

_rom  = 0;
_ram  = 0;
_eram = 65536;

SECTIONS
{
    _text = .;

	.text _rom :
	{
		*(.text)
		*(.text.*)

        *(.init)
        *(.fini)

        . = ALIGN(2);
        _rodata = .;
		*(.rodata)		/* all .rodata sections (constants, strings, etc.)  */
		*(.rodata.*)	/* all .rodata* sections (constants, strings, etc.)  */
        _erodata = .;
	} >rom

    . = ALIGN (4);
    _etext = .;

	.data _ram :
	{
    	_data = .;
		*(.data)
		*(.data.*)
	} >ram

    _edata = .;

    . = ALIGN(4);
    _bss = .;
	.bss :
    {
		*(.dynbss)
		*(.bss .bss.* .gnu.linkonce.b.*)
		*(COMMON)
	} >ram

    . = ALIGN(4);
    _ebss = .;
}
