58 lines
942 B
Plaintext
58 lines
942 B
Plaintext
OUTPUT_FORMAT("elf32-lm32")
|
|
ENTRY(_start)
|
|
|
|
__DYNAMIC = 0;
|
|
|
|
MEMORY {
|
|
rom : ORIGIN = 0x00180000, LENGTH = 0x20000 /* 128K */
|
|
sram : ORIGIN = 0x10000000, LENGTH = 0x01000 /* 4K */
|
|
}
|
|
|
|
SECTIONS
|
|
{
|
|
.text :
|
|
{
|
|
_ftext = .;
|
|
*(.text .stub .text.* .gnu.linkonce.t.*)
|
|
_etext = .;
|
|
} > rom
|
|
|
|
.rodata :
|
|
{
|
|
. = ALIGN(4);
|
|
_frodata = .;
|
|
*(.rodata .rodata.* .gnu.linkonce.r.*)
|
|
*(.rodata1)
|
|
_erodata = .;
|
|
} > rom
|
|
|
|
/* We shouldn't have a .data section, but the GNU crapchain whines if we don't */
|
|
.data :
|
|
{
|
|
. = ALIGN(4);
|
|
_fdata = .;
|
|
*(.data .data.* .gnu.linkonce.d.*)
|
|
*(.data1)
|
|
_gp = ALIGN(16);
|
|
*(.sdata .sdata.* .gnu.linkonce.s.*)
|
|
_edata = .;
|
|
} > rom
|
|
|
|
.bss :
|
|
{
|
|
. = ALIGN(4);
|
|
_fbss = .;
|
|
*(.dynsbss)
|
|
*(.sbss .sbss.* .gnu.linkonce.sb.*)
|
|
*(.scommon)
|
|
*(.dynbss)
|
|
*(.bss .bss.* .gnu.linkonce.b.*)
|
|
*(COMMON)
|
|
. = ALIGN(4);
|
|
_ebss = .;
|
|
_end = .;
|
|
} > sram
|
|
}
|
|
|
|
PROVIDE(_fstack = ORIGIN(sram) + LENGTH(sram) - 4);
|