isfshax/stage2/link.ld
2021-05-26 01:53:11 +02:00

107 lines
1.6 KiB
Plaintext

/*
mini - a Free Software replacement for the Nintendo/BroadOn IOS.
linker script
Copyright (C) 2008, 2009 Hector Martin "marcan" <marcan@marcansoft.com>
# 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
*/
OUTPUT_FORMAT("elf32-bigarm", "elf32-bigarm", "elf32-bigarm")
OUTPUT_ARCH(arm)
EXTERN(_start)
ENTRY(_start)
__stack_size = 0x80000;
__irqstack_size = 0x40000;
__excstack_size = 0x40000;
MEMORY {
sram0 : ORIGIN = 0xffff0000, LENGTH = 64K
mem2 : ORIGIN = 0x10100000, LENGTH = 60M
}
SECTIONS
{
.init :
{
*(.init)
*(.sram.text)
. = ALIGN(4);
} >sram0
.text :
{
*(.text*)
*(.text.*)
*(.gnu.warning)
*(.gnu.linkonce.t*)
*(.glue_7)
*(.glue_7t)
. = ALIGN(4);
} >mem2
.rodata :
{
*(.rodata)
*all.rodata*(*)
*(.roda)
*(.rodata.*)
*(.gnu.linkonce.r*)
. = ALIGN(4);
} >mem2
.data :
{
*(.data)
*(.data.*)
*(.gnu.linkonce.d*)
. = ALIGN(4);
} >mem2
.bss :
{
__bss_start = . ;
*(.dynbss)
*(.gnu.linkonce.b*)
*(.bss*)
*(COMMON)
. = ALIGN(4);
__bss_end = . ;
} >mem2
.stack :
{
. = ALIGN(16);
__stack_end = .;
. = . +__stack_size;
. = ALIGN(16);
__stack_addr = .;
__irqstack_end = .;
. = . +__irqstack_size;
. = ALIGN(16);
__irqstack_addr = .;
__excstack_end = .;
. = . +__excstack_size;
. = ALIGN(16);
__excstack_addr = .;
. = ALIGN(4);
} >mem2
.heap :
{
__end__ = .;
__heap_start__ = .;
__heap_end__ = (ORIGIN(mem2) + LENGTH(mem2));
. = __heap_end__;
} >mem2
/DISCARD/ :
{
*(.ARM.exidx*)
*(.ARM.extab*)
}
}