From ecd7484b9b347f7a5ab33efdd53347f0a2030797 Mon Sep 17 00:00:00 2001 From: Stefan Kristiansson Date: Wed, 1 May 2013 09:32:46 +0000 Subject: openrisc: move board linker script(s) to a common in cpu/ Unifies the openrisc boards linker scripts into a common one. Signed-off-by: Stefan Kristiansson --- arch/openrisc/config.mk | 2 ++ arch/openrisc/cpu/u-boot.lds | 77 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 arch/openrisc/cpu/u-boot.lds (limited to 'arch/openrisc') diff --git a/arch/openrisc/config.mk b/arch/openrisc/config.mk index 521e73aae6..01c0f770ea 100644 --- a/arch/openrisc/config.mk +++ b/arch/openrisc/config.mk @@ -25,3 +25,5 @@ CROSS_COMPILE ?= or32-elf- PLATFORM_CPPFLAGS += -DCONFIG_OPENRISC -D__OR1K__ -ffixed-r10 CONFIG_STANDALONE_LOAD_ADDR ?= 0x40000 + +LDSCRIPT ?= $(SRCTREE)/$(CPUDIR)/u-boot.lds diff --git a/arch/openrisc/cpu/u-boot.lds b/arch/openrisc/cpu/u-boot.lds new file mode 100644 index 0000000000..d9bb7b7f87 --- /dev/null +++ b/arch/openrisc/cpu/u-boot.lds @@ -0,0 +1,77 @@ +#include +OUTPUT_ARCH(or32) +__DYNAMIC = 0; + +MEMORY +{ + vectors : ORIGIN = 0, LENGTH = 0x2000 + ram : ORIGIN = CONFIG_SYS_MONITOR_BASE, + LENGTH = CONFIG_SYS_MONITOR_LEN +} + +SECTIONS +{ + .vectors : + { + *(.vectors) + } > vectors + + __start = .; + .text : AT (__start) { + _stext = .; + *(.text) + _etext = .; + *(.lit) + *(.shdata) + _endtext = .; + } > ram + + + . = ALIGN(4); + .u_boot_list : { + KEEP(*(SORT(.u_boot_list*))); + } > ram + + .rodata : { + *(.rodata); + *(.rodata.*) + } > ram + + .shbss : + { + *(.shbss) + } > ram + + .talias : + { + } > ram + + .data : { + sdata = .; + _sdata = .; + *(.data) + edata = .; + _edata = .; + } > ram + + .bss : + { + _bss_start = .; + *(.bss) + *(COMMON) + _bss_end = .; + } > ram + __end = .; + + /* No stack specification - done manually */ + + .stab 0 (NOLOAD) : + { + [ .stab ] + } + + .stabstr 0 (NOLOAD) : + { + [ .stabstr ] + } +} -- cgit v1.2.3