summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/arm/gdbarmsim
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2010-12-03 10:52:07 +0000
committerSebastian Huber <sebastian.huber@embedded-brains.de>2010-12-03 10:52:07 +0000
commit8d992be9c13b1dd4f9aafd5e2ea81ed87ecd7ce9 (patch)
tree71142b1fe56c2ff37a16962ef89809741bf568e5 /c/src/lib/libbsp/arm/gdbarmsim
parent2010-12-03 Sebastian Huber <sebastian.huber@embedded-brains.de> (diff)
downloadrtems-8d992be9c13b1dd4f9aafd5e2ea81ed87ecd7ce9.tar.bz2
2010-12-03 Sebastian Huber <sebastian.huber@embedded-brains.de>
* bsp_specs, start/start.S, startup/linkcmds: Use linker command base file.
Diffstat (limited to 'c/src/lib/libbsp/arm/gdbarmsim')
-rw-r--r--c/src/lib/libbsp/arm/gdbarmsim/ChangeLog5
-rw-r--r--c/src/lib/libbsp/arm/gdbarmsim/bsp_specs3
-rw-r--r--c/src/lib/libbsp/arm/gdbarmsim/start/start.S5
-rw-r--r--c/src/lib/libbsp/arm/gdbarmsim/startup/linkcmds268
4 files changed, 28 insertions, 253 deletions
diff --git a/c/src/lib/libbsp/arm/gdbarmsim/ChangeLog b/c/src/lib/libbsp/arm/gdbarmsim/ChangeLog
index 9b8ff71664..079f8108b6 100644
--- a/c/src/lib/libbsp/arm/gdbarmsim/ChangeLog
+++ b/c/src/lib/libbsp/arm/gdbarmsim/ChangeLog
@@ -1,3 +1,8 @@
+2010-12-03 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * bsp_specs, start/start.S, startup/linkcmds: Use linker command base
+ file.
+
2010-08-15 Joel Sherrill <joel.sherrilL@OARcorp.com>
* startup/syscalls.c: ifdef out _times since it conflicts with
diff --git a/c/src/lib/libbsp/arm/gdbarmsim/bsp_specs b/c/src/lib/libbsp/arm/gdbarmsim/bsp_specs
index eb3b69e60d..082653ad22 100644
--- a/c/src/lib/libbsp/arm/gdbarmsim/bsp_specs
+++ b/c/src/lib/libbsp/arm/gdbarmsim/bsp_specs
@@ -7,8 +7,7 @@
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s -e _start}}
*link:
-%{!qrtems: %(old_link)} %{qrtems: -dp -Bstatic -N}
+%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
*endfile:
%{!qrtems: *(old_endfiles)} %{qrtems: crtend.o%s crtn.o%s }
-
diff --git a/c/src/lib/libbsp/arm/gdbarmsim/start/start.S b/c/src/lib/libbsp/arm/gdbarmsim/start/start.S
index b2cf39b14d..544d9a3fdf 100644
--- a/c/src/lib/libbsp/arm/gdbarmsim/start/start.S
+++ b/c/src/lib/libbsp/arm/gdbarmsim/start/start.S
@@ -7,6 +7,7 @@
#include <newlib.h>
#include <bsp/swi.h>
+#include <bsp/linker-symbols.h>
/* ANSI concatenation macros. */
#define CONCAT(a, b) CONCAT2(a, b)
@@ -375,9 +376,9 @@ change_back:
.fnend
#endif
.LC1:
- .word __bss_start__
+ .word bsp_section_bss_begin
.LC2:
- .word __clear_end__ /* __bss_end__ */
+ .word bsp_section_bss_end
#ifdef __USES_INITFINI__
.Lfini:
.word FUNCTION(_fini)
diff --git a/c/src/lib/libbsp/arm/gdbarmsim/startup/linkcmds b/c/src/lib/libbsp/arm/gdbarmsim/startup/linkcmds
index 1a20ec26aa..2b8e2153a2 100644
--- a/c/src/lib/libbsp/arm/gdbarmsim/startup/linkcmds
+++ b/c/src/lib/libbsp/arm/gdbarmsim/startup/linkcmds
@@ -1,252 +1,22 @@
-/*
- * Cogent CSB336 Linker script
- *
- * Copyright (c) 2004 by Cogent Computer Systems
- * Written by Jay Monkman <jtm@lopingdog.com>
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- *
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
- "elf32-littlearm")
-OUTPUT_ARCH(arm)
-ENTRY(_start)
-/* SEARCH_DIR(/usr/local/rtems-arm-dev-tools/arm-rtems/lib); */
-
-
MEMORY {
- sdram : ORIGIN = 0x00000000, LENGTH = 4M
-}
-
-/*
- * Declare some sizes.
- */
-
-/* The base for SDRAM is set to umon's APPRAMBASE */
-_sdram_base = DEFINED(_sdram_base) ? _sdram_base : 0x0;
-_sdram_size = DEFINED(_sdram_size) ? _sdram_size : 4M;
-
-RamBase = _sdram_base;
-RamSize = _sdram_size;
-HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
-
-_irq_stack_size = DEFINED(_irq_stack_size) ? _irq_stack_size : 0x1000;
-_fiq_stack_size = DEFINED(_fiq_stack_size) ? _fiq_stack_size : 0x400;
-_abt_stack_size = DEFINED(_abt_stack_size) ? _abt_stack_size : 0x400;
-_undef_stack_size = DEFINED(_undef_stack_size) ? _undef_stack_size : 0x400;
-_svc_stack_size = DEFINED(_svc_stack_size) ? _svc_stack_size : 0x1000;
-
-
-
-/* Do we need any of these for elf?
- __DYNAMIC = 0; */
-
-SECTIONS
-{
- .base :
- {
- arm_exception_table = .;
-
- arm_reset_vect = .; /* 0x00 */
- . += 4;
-
- arm_undef_vect = .; /* 0x04 */
- . += 4;
-
- arm_swi_vect = .; /* 0x08 */
- . += 4;
-
- arm_iabrt_vect = .; /* 0x0c */
- . += 4;
-
- arm_dabrt_vect = .; /* 0x10 */
- . += 4;
-
- /* no vector here */
- . += 4;
-
- arm_irq_vect = .; /* 0x18 */
- . += 4;
-
- arm_fiq_vect = .; /* 0x1c */
- . += 4;
- /* FIXME: */
-
- rtems_vector_table = .;
- . += (8 * 4); /* 8 ARM interrupts */
-
- . = ALIGN (0x100);
-
-
- } > sdram
-
- .text :
- {
- . = 0x8000;
- _text_start = .;
- CREATE_OBJECT_SYMBOLS
- *(.text)
- *(.text.*)
-
- /*
- * Special FreeBSD sysctl sections.
- */
- . = ALIGN (16);
- __start_set_sysctl_set = .;
- *(set_sysctl_*);
- __stop_set_sysctl_set = ABSOLUTE(.);
- *(set_domain_*);
- *(set_pseudo_*);
-
- /* .gnu.warning sections are handled specially by elf32.em. */
- *(.gnu.warning)
- *(.gnu.linkonce.t*)
- *(.glue_7)
- *(.glue_7t)
-
- /* I think these come from the ld docs: */
- ___CTOR_LIST__ = .;
- LONG((___CTOR_END__ - ___CTOR_LIST__) / 4 - 2)
- *(.ctors)
- LONG(0)
- ___CTOR_END__ = .;
- ___DTOR_LIST__ = .;
- LONG((___DTOR_END__ - ___DTOR_LIST__) / 4 - 2)
- *(.dtors)
- LONG(0)
- ___DTOR_END__ = .;
-
- _etext = .;
- PROVIDE (etext = .);
- } > sdram
-
- .init :
- {
- KEEP (*(.init))
- } > sdram /*=0*/
-
- .fini :
- {
- KEEP (*(.fini))
- } > sdram /*=0*/
-
- .data :
- {
- *(.data)
- *(.data.*)
- *(.gnu.linkonce.d*)
- *(.jcr)
- SORT(CONSTRUCTORS)
- _edata = .;
- } > sdram
-
- .eh_frame : { *(.eh_frame) } > sdram
- .data1 : { *(.data1) } > sdram
- .eh_frame : { *(.eh_frame) } > sdram
- .gcc_except_table : { *(.gcc_except_table*) } > sdram
-
- .rodata :
- {
- *(.rodata)
- *(.rodata.*)
- *(.gnu.linkonce.r*)
- } > sdram
-
- .bss :
- {
- __bss_start__ = .;
- _bss_start_ = .;
- _clear_start = .;
- *(.bss)
- *(.bss.*)
- *(.gnu.linkonce.b.*)
- *(COMMON)
- . = ALIGN(64);
- _clear_end = .;
-
- . = ALIGN (256);
- _abt_stack = .;
- . += _abt_stack_size;
-
- . = ALIGN (256);
- _undef_stack = .;
- . += _undef_stack_size;
-
- . = ALIGN (256);
- _irq_stack = .;
- . += _irq_stack_size;
-
- . = ALIGN (256);
- _fiq_stack = .;
- . += _fiq_stack_size;
-
- . = ALIGN (256);
- _svc_stack = .;
- . += _svc_stack_size;
-
-/*
- * Ideally, the MMU's translation table would be in SRAM. But we
- * don't have any. If we don't use more regions than TLB entries (64),
- * the lookup will only happen once for each region.
- */
- . = ALIGN (16 * 1024);
- _ttbl_base = .;
- . += (16 * 1024);
-
- . = ALIGN (1024);
- _bss_free_start = .;
- WorkAreaBase = .;
-
- . = RamSize + RamBase - 1;
- __clear_end__ = .;
- __bss_end__ = .;
- _bss_end_ = .;
- _end = .;
- __end = .;
-
- } > sdram
-
-
-/* Debugging stuff follows? */
-
- /* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section so we begin them at 0. */
- /* DWARF 1 */
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
- /* GNU DWARF 1 extensions */
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
- /* DWARF 1.1 and DWARF 2 */
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
- /* DWARF 2 */
- .debug_info 0 : { *(.debug_info) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
- /* SGI/MIPS DWARF 2 extensions */
- .debug_weaknames 0 : { *(.debug_weaknames) }
- .debug_funcnames 0 : { *(.debug_funcnames) }
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
- /*.stack 0x80000 : { _stack = .; *(.stack) }*/
- /* These must appear regardless of . */
+ RAM : ORIGIN = 0x00000000, LENGTH = 4M
+ NIRVANA : ORIGIN = 0, LENGTH = 0
}
+REGION_ALIAS ("REGION_START", RAM);
+REGION_ALIAS ("REGION_VECTOR", RAM);
+REGION_ALIAS ("REGION_TEXT", RAM);
+REGION_ALIAS ("REGION_TEXT_LOAD", RAM);
+REGION_ALIAS ("REGION_RODATA", RAM);
+REGION_ALIAS ("REGION_RODATA_LOAD", RAM);
+REGION_ALIAS ("REGION_DATA", RAM);
+REGION_ALIAS ("REGION_DATA_LOAD", RAM);
+REGION_ALIAS ("REGION_FAST_TEXT", RAM);
+REGION_ALIAS ("REGION_FAST_TEXT_LOAD", RAM);
+REGION_ALIAS ("REGION_FAST_DATA", RAM);
+REGION_ALIAS ("REGION_FAST_DATA_LOAD", RAM);
+REGION_ALIAS ("REGION_BSS", RAM);
+REGION_ALIAS ("REGION_WORK", RAM);
+REGION_ALIAS ("REGION_STACK", RAM);
+
+INCLUDE linkcmds.armv4