- refactored
git-svn-id: http://moon:8086/svn/mips@148 a8ebac50-d88d-4704-bea3-6648445a41b3
This commit is contained in:
@@ -1,41 +0,0 @@
|
||||
MEMORY
|
||||
{
|
||||
rom : ORIGIN = 0xBFC00000, LENGTH = 0x00002000 /* 8K */
|
||||
ram : ORIGIN = 0x40000000, LENGTH = 0x04000000 /* 64M */
|
||||
flash : ORIGIN = 0xA4000000, LENGTH = 0x00800000 /* 8M */
|
||||
io : ORIGIN = 0xA0000000, LENGTH = 0x00800000 /* 8M */
|
||||
}
|
||||
|
||||
stack_ptr = 0x7FFFEFF0;
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
ROM :
|
||||
{
|
||||
start = ALIGN(4);
|
||||
entry = ALIGN(4);
|
||||
_entry = ALIGN(4);
|
||||
__entry = ALIGN(4);
|
||||
*(.init)
|
||||
. = ORIGIN(rom) + 0x180;
|
||||
*(.ktext)
|
||||
*(.text*)
|
||||
*(.rodata*)
|
||||
. = ORIGIN(rom) + LENGTH(rom) - 0x40;
|
||||
*(.dbg_stub*)
|
||||
} > rom
|
||||
|
||||
.data ORIGIN(ram) :
|
||||
{
|
||||
_ram_start = ALIGN(4);
|
||||
__bss_start = ALIGN(4);
|
||||
*(.*bss)
|
||||
_end = ALIGN(4);
|
||||
} > ram
|
||||
|
||||
.flash ORIGIN(flash) :
|
||||
{
|
||||
_flash_start = ALIGN(4);
|
||||
} > flash
|
||||
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
MEMORY
|
||||
{
|
||||
rom : ORIGIN = 0x9FC00000, LENGTH = 0x00002000 /* 8K */
|
||||
ram : ORIGIN = 0x80000000, LENGTH = 0x04000000 /* 64M */
|
||||
flash_u : ORIGIN = 0xA4000000, LENGTH = 0x00800000 /* 8M */
|
||||
flash_c : ORIGIN = 0x88000000, LENGTH = 0x00800000 /* 8M */
|
||||
io : ORIGIN = 0xAC000000, LENGTH = 0x00800000 /* 8M */
|
||||
}
|
||||
|
||||
stack_ptr = 0x83FFEFF0;
|
||||
baudrate = 0x0D;
|
||||
sys_led_port = 0xAC000000;
|
||||
sys_uart_data = 0xAC010000;
|
||||
sys_uart_stat = 0xAC010004;
|
||||
sys_uart_baud = 0xAC010008;
|
||||
sys_timer_usec = 0xAC00008;
|
||||
sys_timer_sec = 0xAC00000C;
|
||||
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.init ORIGIN(rom) :
|
||||
{
|
||||
start = ALIGN(4);
|
||||
entry = ALIGN(4);
|
||||
_entry = ALIGN(4);
|
||||
__entry = ALIGN(4);
|
||||
*(.stext)
|
||||
} > rom
|
||||
|
||||
.ktext ORIGIN(rom) + 0x180 :
|
||||
{
|
||||
*(.ktext)
|
||||
} > rom
|
||||
|
||||
.text . :
|
||||
{
|
||||
*(.text)
|
||||
} > rom
|
||||
|
||||
.rodata . :
|
||||
{
|
||||
*(.rodata*)
|
||||
} > rom
|
||||
|
||||
.data ORIGIN(ram) :
|
||||
{
|
||||
_ram_start = ALIGN(4);
|
||||
*(.*data) *(.*bss) *(.*common)
|
||||
} > ram
|
||||
|
||||
}
|
||||
@@ -1,92 +0,0 @@
|
||||
/* Specify the memory areas */
|
||||
MEMORY
|
||||
{
|
||||
rom : ORIGIN = 0xBFC00000, LENGTH = 0x00002000 /* 8K */
|
||||
ram : ORIGIN = 0x40000000, LENGTH = 0x04000000 /* 64M */
|
||||
flash : ORIGIN = 0x00000000, LENGTH = 0x00800000 /* 8M */
|
||||
io : ORIGIN = 0xA0000000, LENGTH = 0x00800000 /* 8M */
|
||||
}
|
||||
|
||||
STARTUP(startup.o)
|
||||
INPUT(kernel.o)
|
||||
|
||||
DEBUGGER_VAR_SIZE = 0x10000;
|
||||
SECTIONS
|
||||
{
|
||||
.start :
|
||||
{
|
||||
start = ALIGN(2);
|
||||
entry = ALIGN(2);
|
||||
_entry = ALIGN(2);
|
||||
__entry = ALIGN(2);
|
||||
KEEP (*(.start))
|
||||
} >ram
|
||||
|
||||
.exc_vector ORIGIN(ram) + 0x80 :
|
||||
{
|
||||
KEEP (*(.exc_vect))
|
||||
} >ram
|
||||
.init :
|
||||
{
|
||||
KEEP (*(.init))
|
||||
} >ram
|
||||
.text :
|
||||
{
|
||||
*(.text)
|
||||
*(.text.*)
|
||||
} >ram
|
||||
.fini :
|
||||
{
|
||||
KEEP (*(.fini))
|
||||
} >ram
|
||||
.rodata : { *(.rodata .rodata.*) } >ram
|
||||
.rodata1 : { *(.rodata1) } >ram
|
||||
.sdata2 :
|
||||
{
|
||||
*(.sdata2 .sdata2.*)
|
||||
} >ram
|
||||
.sbss2 : { *(.sbss2 .sbss2.*) } >ram
|
||||
.data :
|
||||
{
|
||||
*(.data .data.*)
|
||||
} >ram
|
||||
.data1 : { *(.data1) } >ram
|
||||
.got.plt : { *(.got.plt) } >ram
|
||||
. = .;
|
||||
_gp = ALIGN(16) + 0x7ff0;
|
||||
.got : { *(.got) }
|
||||
/* We want the small data sections together, so single-instruction offsets
|
||||
can access them all, and initialized data all before uninitialized, so
|
||||
we can shorten the on-disk segment size. */
|
||||
.sdata :
|
||||
{
|
||||
*(.sdata .sdata.*)
|
||||
} >ram
|
||||
__bss_start = .;
|
||||
.sbss :
|
||||
{
|
||||
*(.sbss .sbss.*)
|
||||
*(.scommon)
|
||||
} >ram
|
||||
.bss :
|
||||
{
|
||||
*(.bss .bss.*)
|
||||
*(COMMON)
|
||||
/* Align here to ensure that the .bss section occupies space up to
|
||||
_end. Align after .bss to ensure correct alignment even if the
|
||||
.bss section disappears because there are no input sections.
|
||||
FIXME: Why do we need it? When there is no .bss section, we don't
|
||||
pad the .data section. */
|
||||
. = ALIGN(. != 0 ? 32 / 8 : 1);
|
||||
} >ram
|
||||
. = ALIGN(32 / 8);
|
||||
. = ALIGN(32 / 8);
|
||||
_end = .; PROVIDE (end = .);
|
||||
. = (ORIGIN(ram) + LENGTH(ram) - DEBUGGER_VAR_SIZE - 0x10);
|
||||
stack_ptr = . | ~(LENGTH(ram)-1) & 0x7fffffff;
|
||||
. = . + 0x10;
|
||||
.dbg_vars . (NOLOAD) :
|
||||
{
|
||||
*(.dbg_vars)
|
||||
}
|
||||
}
|
||||
@@ -1,86 +0,0 @@
|
||||
/* Specify the memory areas */
|
||||
MEMORY
|
||||
{
|
||||
rom : ORIGIN = 0xBFC00000, LENGTH = 0x00002000 /* 8K */
|
||||
ram : ORIGIN = 0x80000000, LENGTH = 0x04000000 /* 64M */
|
||||
flash : ORIGIN = 0x00000000, LENGTH = 0x00800000 /* 8M */
|
||||
io : ORIGIN = 0xA0000000, LENGTH = 0x00800000 /* 8M */
|
||||
}
|
||||
|
||||
stack_ptr = 0x83FFEFF0;
|
||||
|
||||
STARTUP(startup.o)
|
||||
INPUT(kernel.o)
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.start :
|
||||
{
|
||||
start = ALIGN(2);
|
||||
entry = ALIGN(2);
|
||||
_entry = ALIGN(2);
|
||||
__entry = ALIGN(2);
|
||||
*(.start)
|
||||
} >ram
|
||||
|
||||
.exc_vector ORIGIN(ram) + 0x80 :
|
||||
{
|
||||
*(.exc_vect)
|
||||
} >ram
|
||||
.init :
|
||||
{
|
||||
KEEP (*(.init))
|
||||
} >ram
|
||||
.text :
|
||||
{
|
||||
*(.text)
|
||||
} >ram
|
||||
.fini :
|
||||
{
|
||||
KEEP (*(.fini))
|
||||
} >ram
|
||||
.rodata : { *(.rodata .rodata.*) } >ram
|
||||
.rodata1 : { *(.rodata1) } >ram
|
||||
.sdata2 :
|
||||
{
|
||||
*(.sdata2 .sdata2.*)
|
||||
} >ram
|
||||
.sbss2 : { *(.sbss2 .sbss2.*) } >ram
|
||||
.data :
|
||||
{
|
||||
*(.data .data.*)
|
||||
} >ram
|
||||
.data1 : { *(.data1) } >ram
|
||||
.got.plt : { *(.got.plt) } >ram
|
||||
. = .;
|
||||
_gp = ALIGN(16) + 0x7ff0;
|
||||
.got : { *(.got) }
|
||||
/* We want the small data sections together, so single-instruction offsets
|
||||
can access them all, and initialized data all before uninitialized, so
|
||||
we can shorten the on-disk segment size. */
|
||||
.sdata :
|
||||
{
|
||||
*(.sdata .sdata.*)
|
||||
} >ram
|
||||
__bss_start = .;
|
||||
.sbss :
|
||||
{
|
||||
*(.sbss .sbss.*)
|
||||
*(.scommon)
|
||||
} >ram
|
||||
.bss :
|
||||
{
|
||||
*(.bss .bss.*)
|
||||
*(COMMON)
|
||||
/* Align here to ensure that the .bss section occupies space up to
|
||||
_end. Align after .bss to ensure correct alignment even if the
|
||||
.bss section disappears because there are no input sections.
|
||||
FIXME: Why do we need it? When there is no .bss section, we don't
|
||||
pad the .data section. */
|
||||
. = ALIGN(. != 0 ? 32 / 8 : 1);
|
||||
} >ram
|
||||
. = ALIGN(32 / 8);
|
||||
. = ALIGN(32 / 8);
|
||||
_end = .; PROVIDE (end = .);
|
||||
}
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
MEMORY
|
||||
{
|
||||
rom : ORIGIN = 0xBFC00000, LENGTH = 0x00002000 /* 8K */
|
||||
ram : ORIGIN = 0x40000000, LENGTH = 0x04000000 /* 64M */
|
||||
flash : ORIGIN = 0xA4000000, LENGTH = 0x00800000 /* 8M */
|
||||
io : ORIGIN = 0xA0000000, LENGTH = 0x00800000 /* 8M */
|
||||
}
|
||||
|
||||
stack_ptr = 0x7FFFEFF0;
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
ROM :
|
||||
{
|
||||
start = ALIGN(4);
|
||||
entry = ALIGN(4);
|
||||
_entry = ALIGN(4);
|
||||
__entry = ALIGN(4);
|
||||
*(.init)
|
||||
. = ORIGIN(rom) + 0x180;
|
||||
*(.ktext)
|
||||
*(.text*)
|
||||
*(.rodata*)
|
||||
. = ORIGIN(rom) + LENGTH(rom) - 0x40;
|
||||
*(.dbg_stub*)
|
||||
} > rom
|
||||
|
||||
.data ORIGIN(ram) :
|
||||
{
|
||||
_ram_start = ALIGN(4);
|
||||
__bss_start = ALIGN(4);
|
||||
*(.*bss)
|
||||
_end = ALIGN(4);
|
||||
} > ram
|
||||
|
||||
.flash ORIGIN(flash) :
|
||||
{
|
||||
_flash_start = ALIGN(4);
|
||||
} > flash
|
||||
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
MEMORY
|
||||
{
|
||||
rom : ORIGIN = 0x9FC00000, LENGTH = 0x00002000 /* 8K */
|
||||
ram : ORIGIN = 0x80000000, LENGTH = 0x04000000 /* 64M */
|
||||
flash_u : ORIGIN = 0xA4000000, LENGTH = 0x00800000 /* 8M */
|
||||
flash_c : ORIGIN = 0x88000000, LENGTH = 0x00800000 /* 8M */
|
||||
io : ORIGIN = 0xAC000000, LENGTH = 0x00800000 /* 8M */
|
||||
}
|
||||
|
||||
stack_ptr = 0x83FFEFF0;
|
||||
baudrate = 0x0D;
|
||||
sys_led_port = 0xAC000000;
|
||||
sys_uart_data = 0xAC010000;
|
||||
sys_uart_stat = 0xAC010004;
|
||||
sys_uart_baud = 0xAC010008;
|
||||
sys_timer_usec = 0xAC00008;
|
||||
sys_timer_sec = 0xAC00000C;
|
||||
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.init ORIGIN(rom) :
|
||||
{
|
||||
start = ALIGN(4);
|
||||
entry = ALIGN(4);
|
||||
_entry = ALIGN(4);
|
||||
__entry = ALIGN(4);
|
||||
*(.stext)
|
||||
} > rom
|
||||
|
||||
.ktext ORIGIN(rom) + 0x180 :
|
||||
{
|
||||
*(.ktext)
|
||||
} > rom
|
||||
|
||||
.text . :
|
||||
{
|
||||
*(.text)
|
||||
} > rom
|
||||
|
||||
.rodata . :
|
||||
{
|
||||
*(.rodata*)
|
||||
} > rom
|
||||
|
||||
.data ORIGIN(ram) :
|
||||
{
|
||||
_ram_start = ALIGN(4);
|
||||
*(.*data) *(.*bss) *(.*common)
|
||||
} > ram
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user