mini/mini.ld

133 lines
1.9 KiB
Plaintext
Raw Permalink Normal View History

2009-04-13 22:13:45 +02:00
/*
mini - a Free Software replacement for the Nintendo/BroadOn IOS.
2009-05-11 07:53:16 +02:00
linker script
2009-04-13 22:13:45 +02:00
Copyright (C) 2008, 2009 Hector Martin "marcan" <marcan@marcansoft.com>
2009-05-11 07:53:16 +02:00
# This code is licensed to you under the terms of the GNU GPL, version 2;
# see file COPYING or http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
2009-04-13 22:13:45 +02:00
*/
2009-05-11 07:53:16 +02:00
2008-12-28 14:35:37 +01:00
OUTPUT_FORMAT("elf32-bigarm")
OUTPUT_ARCH(arm)
EXTERN(_start)
2009-01-25 04:04:19 +01:00
EXTERN(__ipc_info)
2008-12-28 14:35:37 +01:00
ENTRY(_start)
2009-01-08 23:27:22 +01:00
__stack_size = 0x800;
__irqstack_size = 0x100;
__excstack_size = 0x100;
2009-01-06 00:13:39 +01:00
2009-01-08 23:27:22 +01:00
MEMORY {
2009-01-25 04:04:19 +01:00
sram : ORIGIN = 0xffff0000, LENGTH = 64K
sram2 : ORIGIN = 0xfffe0000, LENGTH = 16K
pagetable : ORIGIN = 0xfffe4000, LENGTH = 16K
mem2 : ORIGIN = 0x13f00000, LENGTH = 1M
2009-01-08 23:27:22 +01:00
}
2008-12-28 14:35:37 +01:00
2009-01-25 04:04:19 +01:00
__mem2_area_start = ORIGIN(mem2);
__mem2_area_size = LENGTH(mem2);
__mem2_area_end = ORIGIN(mem2) + LENGTH(mem2);
__page_table = ORIGIN(pagetable);
2008-12-28 14:35:37 +01:00
SECTIONS
{
2009-01-08 23:27:22 +01:00
.rodata.mem2 :
{
*(.rodata.mem2)
. = ALIGN(4);
} >mem2
2009-01-25 04:04:19 +01:00
2009-01-08 23:27:22 +01:00
.data.mem2 :
{
*(.data.mem2)
. = ALIGN(4);
} >mem2
2009-01-06 00:13:39 +01:00
2009-01-08 23:27:22 +01:00
.bss.mem2 :
{
__bss2_start = . ;
*(.bss.mem2)
. = ALIGN(4);
__bss2_end = . ;
} >mem2
2009-01-25 04:04:19 +01:00
.ipcinfo __mem2_area_end - 4 :
{
LONG(__ipc_info);
} >mem2
2008-12-28 14:35:37 +01:00
.init :
{
*(.init)
. = ALIGN(4);
2009-01-08 23:27:22 +01:00
} >sram
2009-01-06 00:13:39 +01:00
2008-12-28 14:35:37 +01:00
.text :
{
2009-01-08 23:27:22 +01:00
*(.text*)
2008-12-28 14:35:37 +01:00
*(.text.*)
*(.gnu.warning)
*(.gnu.linkonce.t*)
*(.glue_7)
*(.glue_7t)
. = ALIGN(4);
2009-01-08 23:27:22 +01:00
} >sram
2008-12-28 14:35:37 +01:00
.rodata :
{
*(.rodata)
*all.rodata*(*)
*(.roda)
*(.rodata.*)
*(.gnu.linkonce.r*)
. = ALIGN(4);
2009-01-08 23:27:22 +01:00
} >sram2
2009-01-25 04:04:19 +01:00
2008-12-28 14:35:37 +01:00
.data :
{
*(.data)
*(.data.*)
*(.gnu.linkonce.d*)
. = ALIGN(4);
2009-01-08 23:27:22 +01:00
} >sram2
2009-01-25 04:04:19 +01:00
2008-12-28 14:35:37 +01:00
.bss :
{
__bss_start = . ;
*(.dynbss)
*(.gnu.linkonce.b*)
*(.bss*)
*(COMMON)
. = ALIGN(4);
__bss_end = . ;
2009-01-08 23:27:22 +01:00
} >sram2
2008-12-28 14:35:37 +01:00
.stack :
{
2009-03-26 05:15:44 +01:00
. = ALIGN(16);
2008-12-28 14:35:37 +01:00
__stack_end = .;
2009-01-08 23:27:22 +01:00
. = . +__stack_size;
2009-03-26 05:15:44 +01:00
. = ALIGN(16);
2008-12-28 14:35:37 +01:00
__stack_addr = .;
2009-01-08 23:27:22 +01:00
__irqstack_end = .;
. = . +__irqstack_size;
2009-03-26 05:15:44 +01:00
. = ALIGN(16);
2009-01-08 23:27:22 +01:00
__irqstack_addr = .;
__excstack_end = .;
. = . +__excstack_size;
2009-03-26 05:15:44 +01:00
. = ALIGN(16);
__excstack_addr = .;
} >sram2
/DISCARD/ :
{
*(.ARM.exidx*)
*(.ARM.extab*)
}
2008-12-28 14:35:37 +01:00
}