From 34344abd3298979bfafa131b193be4b59648f1cc Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 4 Nov 2012 17:18:25 +0000 Subject: [PATCH] Massive clean-up of linker scripts from Freddie Chopin git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5307 42af7a65-404d-4744-a932-0658087f49c3 --- ChangeLog | 2 + configs/avr32dev1/nsh/ld.script | 4 +- configs/avr32dev1/ostest/ld.script | 4 +- configs/demo9s12ne64/ostest/ld.script.banked | 4 +- .../demo9s12ne64/ostest/ld.script.nonbanked | 4 +- configs/ea3131/locked/ld-locked.script | 4 +- configs/ea3131/scripts/ld.script | 30 ++-- configs/ea3131/scripts/pg-ld.script | 36 ++-- configs/ea3152/scripts/ld.script | 30 ++-- configs/eagle100/README.txt | 2 +- configs/eagle100/httpd/Make.defs | 4 +- configs/eagle100/nettest/Make.defs | 4 +- configs/eagle100/nettest/ld.script | 112 ------------ configs/eagle100/nsh/Make.defs | 4 +- configs/eagle100/nsh/ld.script | 112 ------------ configs/eagle100/nxflat/Make.defs | 4 +- configs/eagle100/nxflat/ld.script | 112 ------------ configs/eagle100/ostest/Make.defs | 4 +- configs/eagle100/ostest/ld.script | 112 ------------ configs/eagle100/{httpd => scripts}/ld.script | 20 ++- configs/eagle100/thttpd/Make.defs | 4 +- configs/eagle100/thttpd/ld.script | 112 ------------ configs/ekk-lm3s9b96/scripts/ld.script | 30 ++-- configs/fire-stm32v2/scripts/ld.script | 30 ++-- configs/fire-stm32v2/scripts/ld.script.dfu | 30 ++-- configs/hymini-stm32v/scripts/ld.script | 30 ++-- configs/hymini-stm32v/scripts/ld.script.dfu | 30 ++-- configs/kwikstik-k40/ostest/Make.defs | 4 +- configs/kwikstik-k40/ostest/ld.script | 32 ++-- configs/lincoln60/scripts/ld.script | 32 ++-- configs/lm3s6432-s2e/nsh/Make.defs | 4 +- configs/lm3s6432-s2e/ostest/Make.defs | 4 +- configs/lm3s6432-s2e/ostest/ld.script | 108 ------------ .../lm3s6432-s2e/{nsh => scripts}/ld.script | 34 ++-- configs/lm3s6965-ek/nsh/Make.defs | 4 +- configs/lm3s6965-ek/nx/Make.defs | 4 +- configs/lm3s6965-ek/nx/ld.script | 108 ------------ configs/lm3s6965-ek/ostest/Make.defs | 4 +- configs/lm3s6965-ek/ostest/ld.script | 108 ------------ .../lm3s6965-ek/{nsh => scripts}/ld.script | 34 ++-- configs/lm3s8962-ek/nsh/Make.defs | 4 +- configs/lm3s8962-ek/nsh/ld.script | 108 ------------ configs/lm3s8962-ek/nx/Make.defs | 4 +- configs/lm3s8962-ek/ostest/Make.defs | 4 +- configs/lm3s8962-ek/ostest/ld.script | 108 ------------ configs/lm3s8962-ek/{nx => scripts}/ld.script | 34 ++-- configs/lpc4330-xplorer/scripts/ramconfig.ld | 32 ++-- .../lpc4330-xplorer/scripts/spificonfig.ld | 32 ++-- configs/lpcxpresso-lpc1768/scripts/ld.script | 30 ++-- configs/mbed/hidkbd/Make.defs | 4 +- configs/mbed/hidkbd/ld.script | 109 ------------ configs/mbed/nsh/Make.defs | 4 +- .../usbserial => mbed/scripts}/ld.script | 34 ++-- configs/mcu123-lpc214x/composite/Make.defs | 4 +- configs/mcu123-lpc214x/composite/ld.script | 120 ------------- configs/mcu123-lpc214x/nsh/Make.defs | 4 +- configs/mcu123-lpc214x/ostest/Make.defs | 4 +- configs/mcu123-lpc214x/ostest/ld.script | 119 ------------- .../mcu123-lpc214x/{nsh => scripts}/ld.script | 35 ++-- configs/mcu123-lpc214x/usbserial/Make.defs | 4 +- configs/mcu123-lpc214x/usbserial/ld.script | 119 ------------- configs/mcu123-lpc214x/usbstorage/Make.defs | 4 +- configs/mcu123-lpc214x/usbstorage/ld.script | 119 ------------- configs/mirtoo/scripts/c32-debug.ld | 4 +- configs/mirtoo/scripts/c32-release.ld | 10 +- configs/mirtoo/scripts/mips-elf-debug.ld | 4 +- configs/mirtoo/scripts/mips-elf-release.ld | 10 +- configs/mirtoo/scripts/xc32-debug.ld | 4 +- configs/mirtoo/scripts/xc32-release.ld | 10 +- configs/ne64badge/ostest/ld.script.banked | 4 +- configs/ne64badge/ostest/ld.script.nonbanked | 4 +- configs/nucleus2g/nsh/Make.defs | 4 +- configs/nucleus2g/nsh/ld.script | 109 ------------ configs/nucleus2g/ostest/Make.defs | 4 +- configs/nucleus2g/ostest/ld.script | 109 ------------ .../{mbed/nsh => nucleus2g/scripts}/ld.script | 34 ++-- configs/nucleus2g/usbserial/Make.defs | 4 +- configs/nucleus2g/usbstorage/Make.defs | 4 +- configs/nucleus2g/usbstorage/ld.script | 109 ------------ configs/olimex-lpc1766stk/scripts/ld.script | 30 ++-- configs/olimex-lpc2378/nsh/Make.defs | 4 +- configs/olimex-lpc2378/ostest/Make.defs | 4 +- configs/olimex-lpc2378/ostest/ld.script | 166 ------------------ .../olimex-lpc2378/{nsh => scripts}/ld.script | 42 ++--- configs/olimex-stm32-p107/scripts/ld.script | 30 ++-- .../olimex-stm32-p107/scripts/ld.script.dfu | 30 ++-- configs/olimex-strp711/nettest/Make.defs | 4 +- configs/olimex-strp711/nsh/Make.defs | 4 +- configs/olimex-strp711/nsh/ld.script | 122 ------------- configs/olimex-strp711/ostest/Make.defs | 4 +- configs/olimex-strp711/ostest/ld.script | 122 ------------- .../{nettest => scripts}/ld.script | 35 ++-- configs/pcblogic-pic32mx/nsh/ld.script | 10 +- configs/pcblogic-pic32mx/ostest/ld.script | 10 +- configs/pic32-starterkit/nsh/ld.script | 10 +- configs/pic32-starterkit/nsh2/ld.script | 10 +- configs/pic32-starterkit/ostest/ld.script | 10 +- configs/pic32mx7mmb/nsh/ld.script | 10 +- configs/pic32mx7mmb/ostest/ld.script | 10 +- configs/qemu-i486/nsh/ld.script | 4 +- configs/qemu-i486/ostest/ld.script | 4 +- configs/sam3u-ek/kernel/kernel.ld | 32 ++-- configs/sam3u-ek/knsh/ld.script | 32 ++-- configs/sam3u-ek/nsh/Make.defs | 4 +- configs/sam3u-ek/nsh/ld.script | 111 ------------ configs/sam3u-ek/nx/Make.defs | 4 +- configs/sam3u-ek/ostest/Make.defs | 4 +- configs/sam3u-ek/ostest/ld.script | 111 ------------ configs/sam3u-ek/{nx => scripts}/ld.script | 8 +- configs/sam3u-ek/touchscreen/Make.defs | 4 +- configs/sam3u-ek/touchscreen/ld.script | 111 ------------ configs/shenzhou/scripts/ld.script | 12 +- configs/shenzhou/scripts/ld.script.dfu | 12 +- configs/stm3210e-eval/RIDE/README.txt | 76 ++++---- configs/stm3210e-eval/RIDE/nuttx.elf.ld | 4 +- configs/stm3210e-eval/RIDE/nuttx.rapp | 2 +- configs/stm3210e-eval/RIDE/stm32-nuttx.ld | 111 ------------ configs/stm3210e-eval/scripts/ld.script | 30 ++-- configs/stm3210e-eval/scripts/ld.script.dfu | 30 ++-- configs/stm3220g-eval/scripts/ld.script | 12 +- configs/stm3240g-eval/scripts/ld.script | 12 +- configs/stm32f4discovery/scripts/ld.script | 12 +- configs/sure-pic32mx/nsh/ld.script | 10 +- configs/sure-pic32mx/ostest/ld.script | 10 +- configs/sure-pic32mx/usbnsh/ld.script | 10 +- configs/twr-k60n512/nsh/Make.defs | 4 +- configs/twr-k60n512/ostest/Make.defs | 4 +- configs/twr-k60n512/ostest/ld.script | 135 -------------- .../twr-k60n512/{nsh => scripts}/ld.script | 34 ++-- configs/ubw32/nsh/ld.script | 10 +- configs/ubw32/ostest/ld.script | 10 +- configs/vsn/nsh/Make.defs | 4 +- configs/vsn/nsh/ld.script | 34 ++-- configs/vsn/nsh/ld.script.dfu | 34 ++-- 134 files changed, 852 insertions(+), 3676 deletions(-) delete mode 100644 configs/eagle100/nettest/ld.script delete mode 100644 configs/eagle100/nsh/ld.script delete mode 100644 configs/eagle100/nxflat/ld.script delete mode 100644 configs/eagle100/ostest/ld.script rename configs/eagle100/{httpd => scripts}/ld.script (94%) delete mode 100644 configs/eagle100/thttpd/ld.script delete mode 100644 configs/lm3s6432-s2e/ostest/ld.script rename configs/lm3s6432-s2e/{nsh => scripts}/ld.script (91%) delete mode 100755 configs/lm3s6965-ek/nx/ld.script delete mode 100755 configs/lm3s6965-ek/ostest/ld.script rename configs/lm3s6965-ek/{nsh => scripts}/ld.script (91%) delete mode 100755 configs/lm3s8962-ek/nsh/ld.script delete mode 100755 configs/lm3s8962-ek/ostest/ld.script rename configs/lm3s8962-ek/{nx => scripts}/ld.script (91%) delete mode 100644 configs/mbed/hidkbd/ld.script rename configs/{nucleus2g/usbserial => mbed/scripts}/ld.script (91%) delete mode 100644 configs/mcu123-lpc214x/composite/ld.script delete mode 100644 configs/mcu123-lpc214x/ostest/ld.script rename configs/mcu123-lpc214x/{nsh => scripts}/ld.script (93%) delete mode 100644 configs/mcu123-lpc214x/usbserial/ld.script delete mode 100644 configs/mcu123-lpc214x/usbstorage/ld.script delete mode 100755 configs/nucleus2g/nsh/ld.script delete mode 100755 configs/nucleus2g/ostest/ld.script rename configs/{mbed/nsh => nucleus2g/scripts}/ld.script (91%) delete mode 100755 configs/nucleus2g/usbstorage/ld.script delete mode 100755 configs/olimex-lpc2378/ostest/ld.script rename configs/olimex-lpc2378/{nsh => scripts}/ld.script (92%) delete mode 100644 configs/olimex-strp711/nsh/ld.script delete mode 100644 configs/olimex-strp711/ostest/ld.script rename configs/olimex-strp711/{nettest => scripts}/ld.script (91%) delete mode 100755 configs/sam3u-ek/nsh/ld.script delete mode 100755 configs/sam3u-ek/ostest/ld.script rename configs/sam3u-ek/{nx => scripts}/ld.script (97%) delete mode 100755 configs/sam3u-ek/touchscreen/ld.script delete mode 100755 configs/stm3210e-eval/RIDE/stm32-nuttx.ld delete mode 100644 configs/twr-k60n512/ostest/ld.script rename configs/twr-k60n512/{nsh => scripts}/ld.script (92%) diff --git a/ChangeLog b/ChangeLog index 06bc13fd6e..3b60fc8128 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3562,4 +3562,6 @@ and this results in a crash. On the STM324Discovery, I will have better control over when the static constructors run. * RGMP 4.0 updated from Qiany Yu. + * configs/*/Make.defs and configs/*/ld.script: Massive clean-up + and standardization of linker scripts from Freddie Chopin. diff --git a/configs/avr32dev1/nsh/ld.script b/configs/avr32dev1/nsh/ld.script index 1a7035a739..5f661ca446 100755 --- a/configs/avr32dev1/nsh/ld.script +++ b/configs/avr32dev1/nsh/ld.script @@ -58,10 +58,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) diff --git a/configs/avr32dev1/ostest/ld.script b/configs/avr32dev1/ostest/ld.script index 189a9ebe34..f878abef8c 100755 --- a/configs/avr32dev1/ostest/ld.script +++ b/configs/avr32dev1/ostest/ld.script @@ -58,10 +58,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) diff --git a/configs/demo9s12ne64/ostest/ld.script.banked b/configs/demo9s12ne64/ostest/ld.script.banked index 798658f39e..812f5f19ca 100755 --- a/configs/demo9s12ne64/ostest/ld.script.banked +++ b/configs/demo9s12ne64/ostest/ld.script.banked @@ -90,10 +90,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) diff --git a/configs/demo9s12ne64/ostest/ld.script.nonbanked b/configs/demo9s12ne64/ostest/ld.script.nonbanked index ab36d1c4e2..fae728f629 100755 --- a/configs/demo9s12ne64/ostest/ld.script.nonbanked +++ b/configs/demo9s12ne64/ostest/ld.script.nonbanked @@ -63,10 +63,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) diff --git a/configs/ea3131/locked/ld-locked.script b/configs/ea3131/locked/ld-locked.script index 955505364f..334c328c07 100644 --- a/configs/ea3131/locked/ld-locked.script +++ b/configs/ea3131/locked/ld-locked.script @@ -38,6 +38,6 @@ OUTPUT_ARCH(arm) SECTIONS { .text.locked : { *(.text .text.*) } - .data : { *(.data) } - .bss : { *(.bss) *(COMMON) } + .data : { *(.data) } + .bss : { *(.bss) *(COMMON) } } diff --git a/configs/ea3131/scripts/ld.script b/configs/ea3131/scripts/ld.script index 333117c198..72a3d9f97d 100644 --- a/configs/ea3131/scripts/ld.script +++ b/configs/ea3131/scripts/ld.script @@ -51,10 +51,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) @@ -64,6 +64,22 @@ SECTIONS _etext = ABSOLUTE(.); } > isram + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > isram + + .ARM.extab : { + *(.ARM.extab*) + } > isram + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > isram + __exidx_end = ABSOLUTE(.); + _eronly = ABSOLUTE(.); .data : { @@ -74,16 +90,6 @@ SECTIONS _edata = ABSOLUTE(.); } > isram - .ARM.extab : { - *(.ARM.extab*) - } >isram - - __exidx_start = ABSOLUTE(.); - .ARM.exidx : { - *(.ARM.exidx*) - } > isram - __exidx_end = ABSOLUTE(.); - .bss : { _sbss = ABSOLUTE(.); *(.bss .bss.*) diff --git a/configs/ea3131/scripts/pg-ld.script b/configs/ea3131/scripts/pg-ld.script index 90a713c7de..d7c1f1d4d1 100644 --- a/configs/ea3131/scripts/pg-ld.script +++ b/configs/ea3131/scripts/pg-ld.script @@ -32,7 +32,7 @@ * POSSIBILITY OF SUCH DAMAGE. * ****************************************************************************/ - + /* The LPC3131 has 192Kb of ISRAM beginning at virtual address 0x1102:8000. * LPC31xx boot ROM expects the boot image be compiled with entry point at * 0x1102:9000. A 128b header will appear at this address (applied by @@ -80,10 +80,10 @@ SECTIONS .locked : { _slocked = ABSOLUTE(.); *(.vectors) - up_head.o locked.r (.text .text.*) + up_head.o locked.r (.text .text.*) up_head.o locked.r (.fixup) up_head.o locked.r (.gnu.warning) - up_head.o locked.r (.rodata .rodata.*) + up_head.o locked.r (.rodata .rodata.*) up_head.o locked.r (.gnu.linkonce.t.*) up_head.o locked.r (.glue_7) up_head.o locked.r (.glue_7t) @@ -93,14 +93,30 @@ SECTIONS _elocked = ABSOLUTE(.); } >locked + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > locked + + .ARM.extab : { + *(.ARM.extab*) + } > locked + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > locked + __exidx_end = ABSOLUTE(.); + _eronly = ABSOLUTE(.); .paged : { _spaged = ABSOLUTE(.); - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) @@ -118,16 +134,6 @@ SECTIONS _edata = ABSOLUTE(.); } > data AT > locked - .ARM.extab : { - *(.ARM.extab*) - } >data - - .ARM.exidx : { - __exidx_start = ABSOLUTE(.); - *(.ARM.exidx*) - __exidx_end = ABSOLUTE(.); - } > data - .bss : { _sbss = ABSOLUTE(.); *(.bss .bss.*) diff --git a/configs/ea3152/scripts/ld.script b/configs/ea3152/scripts/ld.script index cf5b5d5196..ff1578df2a 100644 --- a/configs/ea3152/scripts/ld.script +++ b/configs/ea3152/scripts/ld.script @@ -51,10 +51,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) @@ -64,6 +64,22 @@ SECTIONS _etext = ABSOLUTE(.); } > isram + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > isram + + .ARM.extab : { + *(.ARM.extab*) + } > isram + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > isram + __exidx_end = ABSOLUTE(.); + _eronly = ABSOLUTE(.); .data : { @@ -74,16 +90,6 @@ SECTIONS _edata = ABSOLUTE(.); } > isram - .ARM.extab : { - *(.ARM.extab*) - } >isram - - .ARM.exidx : { - __exidx_start = ABSOLUTE(.); - *(.ARM.exidx*) - __exidx_end = ABSOLUTE(.); - } > isram - .bss : { _sbss = ABSOLUTE(.); *(.bss .bss.*) diff --git a/configs/eagle100/README.txt b/configs/eagle100/README.txt index c9253960a2..ce607c7647 100644 --- a/configs/eagle100/README.txt +++ b/configs/eagle100/README.txt @@ -100,7 +100,7 @@ CodeSourcery on Linux ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script MAXOPTIMIZATION = -O2 The values for TOPDIR is provided by the make system; the value for CONFIG_ARCH_BOARD diff --git a/configs/eagle100/httpd/Make.defs b/configs/eagle100/httpd/Make.defs index dc252dfb3a..4d5024d247 100644 --- a/configs/eagle100/httpd/Make.defs +++ b/configs/eagle100/httpd/Make.defs @@ -60,7 +60,7 @@ ifeq ($(CROSSDEV),arm-nuttx-elf-) ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/httpd/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script MAXOPTIMIZATION = -Os else WINTOOL = y @@ -70,7 +70,7 @@ else ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/httpd/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" MAXOPTIMIZATION = -O2 endif diff --git a/configs/eagle100/nettest/Make.defs b/configs/eagle100/nettest/Make.defs index 3de14846e6..98b544ed9b 100644 --- a/configs/eagle100/nettest/Make.defs +++ b/configs/eagle100/nettest/Make.defs @@ -60,7 +60,7 @@ ifeq ($(CROSSDEV),arm-nuttx-elf-) ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nettest/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script MAXOPTIMIZATION = -Os else WINTOOL = y @@ -70,7 +70,7 @@ else ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nettest/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" MAXOPTIMIZATION = -O2 endif diff --git a/configs/eagle100/nettest/ld.script b/configs/eagle100/nettest/ld.script deleted file mode 100644 index 4997200af6..0000000000 --- a/configs/eagle100/nettest/ld.script +++ /dev/null @@ -1,112 +0,0 @@ -/**************************************************************************** - * configs/eagle100/nettest/ld.script - * - * Copyright (C) 2009, 2011-2012 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/* The LM3S6918 has 256Kb of FLASH beginning at address 0x0000:0000. However, - * if the Eagle100 Ethernet bootloader is used, then the entry point must - * be at the following offset in FLASH (and the size of the FLASH must be - * reduced to 248Kb): - */ - -MEMORY -{ -/* flash (rx) : ORIGIN = 0x00000000, LENGTH = 256K */ - flash (rx) : ORIGIN = 0x00002000, LENGTH = 248K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K -} - -OUTPUT_ARCH(arm) -ENTRY(_stext) -SECTIONS -{ - .text : { - _stext = ABSOLUTE(.); - *(.vectors) - *(.text .text.*) - *(.fixup) - *(.gnu.warning) - *(.rodata .rodata.*) - *(.gnu.linkonce.t.*) - *(.glue_7) - *(.glue_7t) - *(.got) - *(.gcc_except_table) - *(.gnu.linkonce.r.*) - _etext = ABSOLUTE(.); - } > flash - - __exidx_start = ABSOLUTE(.); - .ARM.exidx : { - *(.ARM.exidx*) - } > flash - __exidx_end = ABSOLUTE(.); - - _eronly = ABSOLUTE(.); - - /* The LM3S6918 has 64Kb of SRAM beginning at the following address */ - - .data : { - _sdata = ABSOLUTE(.); - *(.data .data.*) - *(.gnu.linkonce.d.*) - CONSTRUCTORS - _edata = ABSOLUTE(.); - } > sram AT > flash - - .ARM.extab : { - *(.ARM.extab*) - } >sram - - .bss : { - _sbss = ABSOLUTE(.); - *(.bss .bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - _ebss = ABSOLUTE(.); - } > sram - - /* 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) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} diff --git a/configs/eagle100/nsh/Make.defs b/configs/eagle100/nsh/Make.defs index ff66759339..efd473f7ab 100644 --- a/configs/eagle100/nsh/Make.defs +++ b/configs/eagle100/nsh/Make.defs @@ -60,7 +60,7 @@ ifeq ($(CROSSDEV),arm-nuttx-elf-) ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script MAXOPTIMIZATION = -Os else WINTOOL = y @@ -70,7 +70,7 @@ else ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" MAXOPTIMIZATION = -O2 endif diff --git a/configs/eagle100/nsh/ld.script b/configs/eagle100/nsh/ld.script deleted file mode 100644 index cdf1a4110d..0000000000 --- a/configs/eagle100/nsh/ld.script +++ /dev/null @@ -1,112 +0,0 @@ -/**************************************************************************** - * configs/eagle100/nsh/ld.script - * - * Copyright (C) 2009, 2011-2012 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/* The LM3S6918 has 256Kb of FLASH beginning at address 0x0000:0000. However, - * if the Eagle100 Ethernet bootloader is used, then the entry point must - * be at the following offset in FLASH (and the size of the FLASH must be - * reduced to 248Kb): - */ - -MEMORY -{ -/* flash (rx) : ORIGIN = 0x00000000, LENGTH = 256K */ - flash (rx) : ORIGIN = 0x00002000, LENGTH = 248K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K -} - -OUTPUT_ARCH(arm) -ENTRY(_stext) -SECTIONS -{ - .text : { - _stext = ABSOLUTE(.); - *(.vectors) - *(.text .text.*) - *(.fixup) - *(.gnu.warning) - *(.rodata .rodata.*) - *(.gnu.linkonce.t.*) - *(.glue_7) - *(.glue_7t) - *(.got) - *(.gcc_except_table) - *(.gnu.linkonce.r.*) - _etext = ABSOLUTE(.); - } > flash - - __exidx_start = ABSOLUTE(.); - .ARM.exidx : { - *(.ARM.exidx*) - } > flash - __exidx_end = ABSOLUTE(.); - - _eronly = ABSOLUTE(.); - - /* The LM3S6918 has 64Kb of SRAM beginning at the following address */ - - .data : { - _sdata = ABSOLUTE(.); - *(.data .data.*) - *(.gnu.linkonce.d.*) - CONSTRUCTORS - _edata = ABSOLUTE(.); - } > sram AT > flash - - .ARM.extab : { - *(.ARM.extab*) - } >sram - - .bss : { - _sbss = ABSOLUTE(.); - *(.bss .bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - _ebss = ABSOLUTE(.); - } > sram - - /* 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) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} diff --git a/configs/eagle100/nxflat/Make.defs b/configs/eagle100/nxflat/Make.defs index 780e858504..6c6965d202 100644 --- a/configs/eagle100/nxflat/Make.defs +++ b/configs/eagle100/nxflat/Make.defs @@ -63,7 +63,7 @@ ifeq ($(CROSSDEV),arm-nuttx-elf-) ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nxflat/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script MAXOPTIMIZATION = -Os else WINTOOL = y @@ -73,7 +73,7 @@ else ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nxflat/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" MAXOPTIMIZATION = -O2 endif diff --git a/configs/eagle100/nxflat/ld.script b/configs/eagle100/nxflat/ld.script deleted file mode 100644 index 153e777b5f..0000000000 --- a/configs/eagle100/nxflat/ld.script +++ /dev/null @@ -1,112 +0,0 @@ -/**************************************************************************** - * configs/eagle100/nxflat/ld.script - * - * Copyright (C) 2009, 2011-2012 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/* The LM3S6918 has 256Kb of FLASH beginning at address 0x0000:0000. However, - * if the Eagle100 Ethernet bootloader is used, then the entry point must - * be at the following offset in FLASH (and the size of the FLASH must be - * reduced to 248Kb): - */ - -MEMORY -{ -/* flash (rx) : ORIGIN = 0x00000000, LENGTH = 256K */ - flash (rx) : ORIGIN = 0x00002000, LENGTH = 248K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K -} - -OUTPUT_ARCH(arm) -ENTRY(_stext) -SECTIONS -{ - .text : { - _stext = ABSOLUTE(.); - *(.vectors) - *(.text .text.*) - *(.fixup) - *(.gnu.warning) - *(.rodata .rodata.*) - *(.gnu.linkonce.t.*) - *(.glue_7) - *(.glue_7t) - *(.got) - *(.gcc_except_table) - *(.gnu.linkonce.r.*) - _etext = ABSOLUTE(.); - } > flash - - __exidx_start = ABSOLUTE(.); - .ARM.exidx : { - *(.ARM.exidx*) - } > flash - __exidx_end = ABSOLUTE(.); - - _eronly = ABSOLUTE(.); - - /* The LM3S6918 has 64Kb of SRAM beginning at the following address */ - - .data : { - _sdata = ABSOLUTE(.); - *(.data .data.*) - *(.gnu.linkonce.d.*) - CONSTRUCTORS - _edata = ABSOLUTE(.); - } > sram AT > flash - - .ARM.extab : { - *(.ARM.extab*) - } >sram - - .bss : { - _sbss = ABSOLUTE(.); - *(.bss .bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - _ebss = ABSOLUTE(.); - } > sram - - /* 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) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} diff --git a/configs/eagle100/ostest/Make.defs b/configs/eagle100/ostest/Make.defs index 78db5644e4..f28f6d90be 100644 --- a/configs/eagle100/ostest/Make.defs +++ b/configs/eagle100/ostest/Make.defs @@ -60,7 +60,7 @@ ifeq ($(CROSSDEV),arm-nuttx-elf-) ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script MAXOPTIMIZATION = -Os else WINTOOL = y @@ -70,7 +70,7 @@ else ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" MAXOPTIMIZATION = -O2 endif diff --git a/configs/eagle100/ostest/ld.script b/configs/eagle100/ostest/ld.script deleted file mode 100644 index 10c2f0cfad..0000000000 --- a/configs/eagle100/ostest/ld.script +++ /dev/null @@ -1,112 +0,0 @@ -/**************************************************************************** - * configs/eagle100/ostest/ld.script - * - * Copyright (C) 2009, 2011-2012 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/* The LM3S6918 has 256Kb of FLASH beginning at address 0x0000:0000. However, - * if the Eagle100 Ethernet bootloader is used, then the entry point must - * be at the following offset in FLASH (and the size of the FLASH must be - * reduced to 248Kb): - */ - -MEMORY -{ -/* flash (rx) : ORIGIN = 0x00000000, LENGTH = 256K */ - flash (rx) : ORIGIN = 0x00002000, LENGTH = 248K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K -} - -OUTPUT_ARCH(arm) -ENTRY(_stext) -SECTIONS -{ - .text : { - _stext = ABSOLUTE(.); - *(.vectors) - *(.text .text.*) - *(.fixup) - *(.gnu.warning) - *(.rodata .rodata.*) - *(.gnu.linkonce.t.*) - *(.glue_7) - *(.glue_7t) - *(.got) - *(.gcc_except_table) - *(.gnu.linkonce.r.*) - _etext = ABSOLUTE(.); - } > flash - - __exidx_start = ABSOLUTE(.); - .ARM.exidx : { - *(.ARM.exidx*) - } > flash - __exidx_end = ABSOLUTE(.); - - _eronly = ABSOLUTE(.); - - /* The LM3S6918 has 64Kb of SRAM beginning at the following address */ - - .data : { - _sdata = ABSOLUTE(.); - *(.data .data.*) - *(.gnu.linkonce.d.*) - CONSTRUCTORS - _edata = ABSOLUTE(.); - } > sram AT > flash - - .ARM.extab : { - *(.ARM.extab*) - } >sram - - .bss : { - _sbss = ABSOLUTE(.); - *(.bss .bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - _ebss = ABSOLUTE(.); - } > sram - - /* 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) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} diff --git a/configs/eagle100/httpd/ld.script b/configs/eagle100/scripts/ld.script similarity index 94% rename from configs/eagle100/httpd/ld.script rename to configs/eagle100/scripts/ld.script index 24e9c90b72..0382307696 100644 --- a/configs/eagle100/httpd/ld.script +++ b/configs/eagle100/scripts/ld.script @@ -1,5 +1,5 @@ /**************************************************************************** - * configs/eagle100/httpd/ld.script + * configs/eagle100/scripts/ld.script * * Copyright (C) 2009, 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -53,10 +53,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) @@ -66,6 +66,16 @@ SECTIONS _etext = ABSOLUTE(.); } > flash + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > flash + + .ARM.extab : { + *(.ARM.extab*) + } > flash + __exidx_start = ABSOLUTE(.); .ARM.exidx : { *(.ARM.exidx*) @@ -84,10 +94,6 @@ SECTIONS _edata = ABSOLUTE(.); } > sram AT > flash - .ARM.extab : { - *(.ARM.extab*) - } >sram - .bss : { _sbss = ABSOLUTE(.); *(.bss .bss.*) diff --git a/configs/eagle100/thttpd/Make.defs b/configs/eagle100/thttpd/Make.defs index 87157525b3..83abbe411a 100644 --- a/configs/eagle100/thttpd/Make.defs +++ b/configs/eagle100/thttpd/Make.defs @@ -63,7 +63,7 @@ ifeq ($(CROSSDEV),arm-nuttx-elf-) ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/thttpd/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script MAXOPTIMIZATION = -Os else WINTOOL = y @@ -73,7 +73,7 @@ else ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/thttpd/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" MAXOPTIMIZATION = -O2 endif diff --git a/configs/eagle100/thttpd/ld.script b/configs/eagle100/thttpd/ld.script deleted file mode 100644 index 7a1d7c75d8..0000000000 --- a/configs/eagle100/thttpd/ld.script +++ /dev/null @@ -1,112 +0,0 @@ -/**************************************************************************** - * configs/eagle100/thttpd/ld.script - * - * Copyright (C) 2009, 2011-2012 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/* The LM3S6918 has 256Kb of FLASH beginning at address 0x0000:0000. However, - * if the Eagle100 Ethernet bootloader is used, then the entry point must - * be at the following offset in FLASH (and the size of the FLASH must be - * reduced to 248Kb): - */ - -MEMORY -{ -/* flash (rx) : ORIGIN = 0x00000000, LENGTH = 256K */ - flash (rx) : ORIGIN = 0x00002000, LENGTH = 248K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K -} - -OUTPUT_ARCH(arm) -ENTRY(_stext) -SECTIONS -{ - .text : { - _stext = ABSOLUTE(.); - *(.vectors) - *(.text .text.*) - *(.fixup) - *(.gnu.warning) - *(.rodata .rodata.*) - *(.gnu.linkonce.t.*) - *(.glue_7) - *(.glue_7t) - *(.got) - *(.gcc_except_table) - *(.gnu.linkonce.r.*) - _etext = ABSOLUTE(.); - } > flash - - __exidx_start = ABSOLUTE(.); - .ARM.exidx : { - *(.ARM.exidx*) - } > flash - __exidx_end = ABSOLUTE(.); - - _eronly = ABSOLUTE(.); - - /* The LM3S6918 has 64Kb of SRAM beginning at the following address */ - - .data : { - _sdata = ABSOLUTE(.); - *(.data .data.*) - *(.gnu.linkonce.d.*) - CONSTRUCTORS - _edata = ABSOLUTE(.); - } > sram AT > flash - - .ARM.extab : { - *(.ARM.extab*) - } >sram - - .bss : { - _sbss = ABSOLUTE(.); - *(.bss .bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - _ebss = ABSOLUTE(.); - } > sram - - /* 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) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} diff --git a/configs/ekk-lm3s9b96/scripts/ld.script b/configs/ekk-lm3s9b96/scripts/ld.script index 22d2edfdb9..a85999f6e6 100644 --- a/configs/ekk-lm3s9b96/scripts/ld.script +++ b/configs/ekk-lm3s9b96/scripts/ld.script @@ -51,10 +51,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) @@ -64,6 +64,22 @@ SECTIONS _etext = ABSOLUTE(.); } > flash + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > flash + + .ARM.extab : { + *(.ARM.extab*) + } > flash + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > flash + __exidx_end = ABSOLUTE(.); + _eronly = ABSOLUTE(.); .data : { @@ -74,16 +90,6 @@ SECTIONS _edata = ABSOLUTE(.); } > sram AT > flash - .ARM.extab : { - *(.ARM.extab*) - } >sram - - .ARM.exidx : { - __exidx_start = ABSOLUTE(.); - *(.ARM.exidx*) - __exidx_end = ABSOLUTE(.); - } >sram - .bss : { _sbss = ABSOLUTE(.); *(.bss .bss.*) diff --git a/configs/fire-stm32v2/scripts/ld.script b/configs/fire-stm32v2/scripts/ld.script index 443dec50d8..225af3834b 100644 --- a/configs/fire-stm32v2/scripts/ld.script +++ b/configs/fire-stm32v2/scripts/ld.script @@ -53,10 +53,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) @@ -66,6 +66,22 @@ SECTIONS _etext = ABSOLUTE(.); } > flash + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > flash + + .ARM.extab : { + *(.ARM.extab*) + } > flash + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > flash + __exidx_end = ABSOLUTE(.); + _eronly = ABSOLUTE(.); /* The STM32F103Z has 64Kb of SRAM beginning at the following address */ @@ -78,16 +94,6 @@ SECTIONS _edata = ABSOLUTE(.); } > sram AT > flash - .ARM.extab : { - *(.ARM.extab*) - } >sram - - __exidx_start = ABSOLUTE(.); - .ARM.exidx : { - *(.ARM.exidx*) - } >sram - __exidx_end = ABSOLUTE(.); - .bss : { _sbss = ABSOLUTE(.); *(.bss .bss.*) diff --git a/configs/fire-stm32v2/scripts/ld.script.dfu b/configs/fire-stm32v2/scripts/ld.script.dfu index c7add1422c..fd6576cc31 100644 --- a/configs/fire-stm32v2/scripts/ld.script.dfu +++ b/configs/fire-stm32v2/scripts/ld.script.dfu @@ -52,10 +52,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) @@ -65,6 +65,22 @@ SECTIONS _etext = ABSOLUTE(.); } > flash + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > flash + + .ARM.extab : { + *(.ARM.extab*) + } > flash + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > flash + __exidx_end = ABSOLUTE(.); + _eronly = ABSOLUTE(.); /* The STM32F103Z has 64Kb of SRAM beginning at the following address */ @@ -77,16 +93,6 @@ SECTIONS _edata = ABSOLUTE(.); } > sram AT > flash - .ARM.extab : { - *(.ARM.extab*) - } >sram - - __exidx_start = ABSOLUTE(.); - .ARM.exidx : { - *(.ARM.exidx*) - } >sram - __exidx_end = ABSOLUTE(.); - .bss : { _sbss = ABSOLUTE(.); *(.bss .bss.*) diff --git a/configs/hymini-stm32v/scripts/ld.script b/configs/hymini-stm32v/scripts/ld.script index cef391bf42..15370f39a2 100644 --- a/configs/hymini-stm32v/scripts/ld.script +++ b/configs/hymini-stm32v/scripts/ld.script @@ -54,10 +54,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) @@ -67,6 +67,22 @@ SECTIONS _etext = ABSOLUTE(.); } > flash + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > flash + + .ARM.extab : { + *(.ARM.extab*) + } > flash + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > flash + __exidx_end = ABSOLUTE(.); + _eronly = ABSOLUTE(.); /* The STM32F103VCT6 has 48Kb of SRAM beginning at the following address */ @@ -79,16 +95,6 @@ SECTIONS _edata = ABSOLUTE(.); } > sram AT > flash - .ARM.extab : { - *(.ARM.extab*) - } >sram - - __exidx_start = ABSOLUTE(.); - .ARM.exidx : { - *(.ARM.exidx*) - } >sram - __exidx_end = ABSOLUTE(.); - .bss : { _sbss = ABSOLUTE(.); *(.bss .bss.*) diff --git a/configs/hymini-stm32v/scripts/ld.script.dfu b/configs/hymini-stm32v/scripts/ld.script.dfu index 1f51a9fc3f..23ab5e196b 100644 --- a/configs/hymini-stm32v/scripts/ld.script.dfu +++ b/configs/hymini-stm32v/scripts/ld.script.dfu @@ -52,10 +52,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) @@ -65,6 +65,22 @@ SECTIONS _etext = ABSOLUTE(.); } > flash + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > flash + + .ARM.extab : { + *(.ARM.extab*) + } > flash + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > flash + __exidx_end = ABSOLUTE(.); + _eronly = ABSOLUTE(.); /* The STM32F103VCT6 has 48Kb of SRAM beginning at the following address */ @@ -77,16 +93,6 @@ SECTIONS _edata = ABSOLUTE(.); } > sram AT > flash - .ARM.extab : { - *(.ARM.extab*) - } >sram - - __exidx_start = ABSOLUTE(.); - .ARM.exidx : { - *(.ARM.exidx*) - } >sram - __exidx_end = ABSOLUTE(.); - .bss : { _sbss = ABSOLUTE(.); *(.bss .bss.*) diff --git a/configs/kwikstik-k40/ostest/Make.defs b/configs/kwikstik-k40/ostest/Make.defs index a51f37e94f..f239d872d4 100644 --- a/configs/kwikstik-k40/ostest/Make.defs +++ b/configs/kwikstik-k40/ostest/Make.defs @@ -74,14 +74,14 @@ ifeq ($(WINTOOL),y) MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" MAXOPTIMIZATION = -O2 else # Linux/Cygwin-native toolchain MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script endif CC = $(CROSSDEV)gcc diff --git a/configs/kwikstik-k40/ostest/ld.script b/configs/kwikstik-k40/ostest/ld.script index 2b7b517fa3..97ac473caa 100755 --- a/configs/kwikstik-k40/ostest/ld.script +++ b/configs/kwikstik-k40/ostest/ld.script @@ -1,5 +1,5 @@ /**************************************************************************** - * configs/kwikstik-k40/ostest/ld.script + * configs/kwikstik-k40/scripts/ld.script * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -70,10 +70,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) @@ -83,6 +83,22 @@ SECTIONS _etext = ABSOLUTE(.); } > progflash + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > progflash + + .ARM.extab : { + *(.ARM.extab*) + } > progflash + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > progflash + __exidx_end = ABSOLUTE(.); + .data : { _sdata = ABSOLUTE(.); *(.data .data.*) @@ -101,16 +117,6 @@ SECTIONS _framfuncs = LOADADDR(.ramfunc); - .ARM.extab : { - *(.ARM.extab*) - } > datasram - - __exidx_start = ABSOLUTE(.); - .ARM.exidx : { - *(.ARM.exidx*) - } > datasram - __exidx_end = ABSOLUTE(.); - .bss : { _sbss = ABSOLUTE(.); *(.bss .bss.*) diff --git a/configs/lincoln60/scripts/ld.script b/configs/lincoln60/scripts/ld.script index 262e62df86..ece01a00a1 100644 --- a/configs/lincoln60/scripts/ld.script +++ b/configs/lincoln60/scripts/ld.script @@ -53,10 +53,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) @@ -66,7 +66,23 @@ SECTIONS _etext = ABSOLUTE(.); } > flash - _eronly = ABSOLUTE(.); /* See below */ + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > flash + + .ARM.extab : { + *(.ARM.extab*) + } > flash + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > flash + __exidx_end = ABSOLUTE(.); + + _eronly = ABSOLUTE(.); .data : { _sdata = ABSOLUTE(.); @@ -76,16 +92,6 @@ SECTIONS _edata = ABSOLUTE(.); } > sram AT > flash - .ARM.extab : { - *(.ARM.extab*) - } >sram - - __exidx_start = ABSOLUTE(.); - .ARM.exidx : { - *(.ARM.exidx*) - } >sram - __exidx_end = ABSOLUTE(.); - .bss : { _sbss = ABSOLUTE(.); *(.bss .bss.*) diff --git a/configs/lm3s6432-s2e/nsh/Make.defs b/configs/lm3s6432-s2e/nsh/Make.defs index c9ade8028a..795d928d2e 100644 --- a/configs/lm3s6432-s2e/nsh/Make.defs +++ b/configs/lm3s6432-s2e/nsh/Make.defs @@ -74,14 +74,14 @@ ifeq ($(WINTOOL),y) MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" MAXOPTIMIZATION = -O2 else # Linux/Cygwin-native toolchain MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script endif CC = $(CROSSDEV)gcc diff --git a/configs/lm3s6432-s2e/ostest/Make.defs b/configs/lm3s6432-s2e/ostest/Make.defs index 5f48145bfd..8a0fc03175 100644 --- a/configs/lm3s6432-s2e/ostest/Make.defs +++ b/configs/lm3s6432-s2e/ostest/Make.defs @@ -74,14 +74,14 @@ ifeq ($(WINTOOL),y) MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" MAXOPTIMIZATION = -O2 else # Linux/Cygwin-native toolchain MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script endif CC = $(CROSSDEV)gcc diff --git a/configs/lm3s6432-s2e/ostest/ld.script b/configs/lm3s6432-s2e/ostest/ld.script deleted file mode 100644 index bfbf8d3024..0000000000 --- a/configs/lm3s6432-s2e/ostest/ld.script +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** - * configs/lm3s6432-s2e/ostest/ld.script - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/* The LM3S6432 has 96Kb of FLASH beginning at address 0x0000:0000 and 32Kb - * of SRAM beginning at 0x2000:0000. - */ - -MEMORY -{ - flash (rx) : ORIGIN = 0x00000000, LENGTH = 96K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 32K -} - -OUTPUT_ARCH(arm) -ENTRY(_stext) -SECTIONS -{ - .text : { - _stext = ABSOLUTE(.); - *(.vectors) - *(.text .text.*) - *(.fixup) - *(.gnu.warning) - *(.rodata .rodata.*) - *(.gnu.linkonce.t.*) - *(.glue_7) - *(.glue_7t) - *(.got) - *(.gcc_except_table) - *(.gnu.linkonce.r.*) - _etext = ABSOLUTE(.); - } > flash - - _eronly = ABSOLUTE(.); /* See below */ - - /* The LM3S6432 has 32Kb of SRAM beginning at the following address */ - - .data : { - _sdata = ABSOLUTE(.); - *(.data .data.*) - *(.gnu.linkonce.d.*) - CONSTRUCTORS - _edata = ABSOLUTE(.); - } > sram AT > flash - - .ARM.extab : { - *(.ARM.extab*) - } >sram - - .ARM.exidx : { - __exidx_start = ABSOLUTE(.); - *(.ARM.exidx*) - __exidx_end = ABSOLUTE(.); - } >sram - - .bss : { /* BSS */ - _sbss = ABSOLUTE(.); - *(.bss .bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - _ebss = ABSOLUTE(.); - } > sram - /* 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) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} diff --git a/configs/lm3s6432-s2e/nsh/ld.script b/configs/lm3s6432-s2e/scripts/ld.script similarity index 91% rename from configs/lm3s6432-s2e/nsh/ld.script rename to configs/lm3s6432-s2e/scripts/ld.script index 0701841c5a..555eb77ba9 100644 --- a/configs/lm3s6432-s2e/nsh/ld.script +++ b/configs/lm3s6432-s2e/scripts/ld.script @@ -1,5 +1,5 @@ /**************************************************************************** - * configs/lm3s6432-s2e/nsh/ld.script + * configs/lm3s6432-s2e/scripts/ld.script * * Copyright (C) 2010 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -50,10 +50,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) @@ -63,7 +63,23 @@ SECTIONS _etext = ABSOLUTE(.); } > flash - _eronly = ABSOLUTE(.); /* See below */ + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > flash + + .ARM.extab : { + *(.ARM.extab*) + } > flash + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > flash + __exidx_end = ABSOLUTE(.); + + _eronly = ABSOLUTE(.); /* The LM3S6432 has 32Kb of SRAM beginning at the following address */ @@ -75,16 +91,6 @@ SECTIONS _edata = ABSOLUTE(.); } > sram AT > flash - .ARM.extab : { - *(.ARM.extab*) - } >sram - - .ARM.exidx : { - __exidx_start = ABSOLUTE(.); - *(.ARM.exidx*) - __exidx_end = ABSOLUTE(.); - } >sram - .bss : { /* BSS */ _sbss = ABSOLUTE(.); *(.bss .bss.*) diff --git a/configs/lm3s6965-ek/nsh/Make.defs b/configs/lm3s6965-ek/nsh/Make.defs index 6fc8616aab..72ea6b151e 100644 --- a/configs/lm3s6965-ek/nsh/Make.defs +++ b/configs/lm3s6965-ek/nsh/Make.defs @@ -74,14 +74,14 @@ ifeq ($(WINTOOL),y) MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" MAXOPTIMIZATION = -O2 else # Linux/Cygwin-native toolchain MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script endif CC = $(CROSSDEV)gcc diff --git a/configs/lm3s6965-ek/nx/Make.defs b/configs/lm3s6965-ek/nx/Make.defs index 887bb823a3..2a409101bb 100644 --- a/configs/lm3s6965-ek/nx/Make.defs +++ b/configs/lm3s6965-ek/nx/Make.defs @@ -74,14 +74,14 @@ ifeq ($(WINTOOL),y) MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nx/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" MAXOPTIMIZATION = -O2 else # Linux/Cygwin-native toolchain MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nx/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script endif CC = $(CROSSDEV)gcc diff --git a/configs/lm3s6965-ek/nx/ld.script b/configs/lm3s6965-ek/nx/ld.script deleted file mode 100755 index dcb12fa99a..0000000000 --- a/configs/lm3s6965-ek/nx/ld.script +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** - * configs/lm3s6965-ek/nx/ld.script - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/* The LM3S6965 has 256Kb of FLASH beginning at address 0x0000:0000 and 64Kb - * of SRAM beginning at 0x2000:0000. - */ - -MEMORY -{ - flash (rx) : ORIGIN = 0x00000000, LENGTH = 256K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K -} - -OUTPUT_ARCH(arm) -ENTRY(_stext) -SECTIONS -{ - .text : { - _stext = ABSOLUTE(.); - *(.vectors) - *(.text .text.*) - *(.fixup) - *(.gnu.warning) - *(.rodata .rodata.*) - *(.gnu.linkonce.t.*) - *(.glue_7) - *(.glue_7t) - *(.got) - *(.gcc_except_table) - *(.gnu.linkonce.r.*) - _etext = ABSOLUTE(.); - } > flash - - _eronly = ABSOLUTE(.); /* See below */ - - /* The LM3S6918 has 64Kb of SRAM beginning at the following address */ - - .data : { - _sdata = ABSOLUTE(.); - *(.data .data.*) - *(.gnu.linkonce.d.*) - CONSTRUCTORS - _edata = ABSOLUTE(.); - } > sram AT > flash - - .ARM.extab : { - *(.ARM.extab*) - } >sram - - .ARM.exidx : { - __exidx_start = ABSOLUTE(.); - *(.ARM.exidx*) - __exidx_end = ABSOLUTE(.); - } >sram - - .bss : { /* BSS */ - _sbss = ABSOLUTE(.); - *(.bss .bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - _ebss = ABSOLUTE(.); - } > sram - /* 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) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} diff --git a/configs/lm3s6965-ek/ostest/Make.defs b/configs/lm3s6965-ek/ostest/Make.defs index 0c02e22bb0..ae376da0c5 100644 --- a/configs/lm3s6965-ek/ostest/Make.defs +++ b/configs/lm3s6965-ek/ostest/Make.defs @@ -74,14 +74,14 @@ ifeq ($(WINTOOL),y) MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" MAXOPTIMIZATION = -O2 else # Linux/Cygwin-native toolchain MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script endif CC = $(CROSSDEV)gcc diff --git a/configs/lm3s6965-ek/ostest/ld.script b/configs/lm3s6965-ek/ostest/ld.script deleted file mode 100755 index e330f35ae4..0000000000 --- a/configs/lm3s6965-ek/ostest/ld.script +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** - * configs/lm3s6965-ek/ostest/ld.script - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/* The LM3S6965 has 256Kb of FLASH beginning at address 0x0000:0000 and 64Kb - * of SRAM beginning at 0x2000:0000. - */ - -MEMORY -{ - flash (rx) : ORIGIN = 0x00000000, LENGTH = 256K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K -} - -OUTPUT_ARCH(arm) -ENTRY(_stext) -SECTIONS -{ - .text : { - _stext = ABSOLUTE(.); - *(.vectors) - *(.text .text.*) - *(.fixup) - *(.gnu.warning) - *(.rodata .rodata.*) - *(.gnu.linkonce.t.*) - *(.glue_7) - *(.glue_7t) - *(.got) - *(.gcc_except_table) - *(.gnu.linkonce.r.*) - _etext = ABSOLUTE(.); - } > flash - - _eronly = ABSOLUTE(.); /* See below */ - - /* The LM3S6918 has 64Kb of SRAM beginning at the following address */ - - .data : { - _sdata = ABSOLUTE(.); - *(.data .data.*) - *(.gnu.linkonce.d.*) - CONSTRUCTORS - _edata = ABSOLUTE(.); - } > sram AT > flash - - .ARM.extab : { - *(.ARM.extab*) - } >sram - - .ARM.exidx : { - __exidx_start = ABSOLUTE(.); - *(.ARM.exidx*) - __exidx_end = ABSOLUTE(.); - } >sram - - .bss : { /* BSS */ - _sbss = ABSOLUTE(.); - *(.bss .bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - _ebss = ABSOLUTE(.); - } > sram - /* 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) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} diff --git a/configs/lm3s6965-ek/nsh/ld.script b/configs/lm3s6965-ek/scripts/ld.script similarity index 91% rename from configs/lm3s6965-ek/nsh/ld.script rename to configs/lm3s6965-ek/scripts/ld.script index d3a0d668e4..7350cf5ee5 100755 --- a/configs/lm3s6965-ek/nsh/ld.script +++ b/configs/lm3s6965-ek/scripts/ld.script @@ -1,5 +1,5 @@ /**************************************************************************** - * configs/lm3s6965-ek/nsh/ld.script + * configs/lm3s6965-ek/scripts/ld.script * * Copyright (C) 2010 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -50,10 +50,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) @@ -63,7 +63,23 @@ SECTIONS _etext = ABSOLUTE(.); } > flash - _eronly = ABSOLUTE(.); /* See below */ + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > flash + + .ARM.extab : { + *(.ARM.extab*) + } > flash + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > flash + __exidx_end = ABSOLUTE(.); + + _eronly = ABSOLUTE(.); /* The LM3S6918 has 64Kb of SRAM beginning at the following address */ @@ -75,16 +91,6 @@ SECTIONS _edata = ABSOLUTE(.); } > sram AT > flash - .ARM.extab : { - *(.ARM.extab*) - } >sram - - .ARM.exidx : { - __exidx_start = ABSOLUTE(.); - *(.ARM.exidx*) - __exidx_end = ABSOLUTE(.); - } >sram - .bss : { /* BSS */ _sbss = ABSOLUTE(.); *(.bss .bss.*) diff --git a/configs/lm3s8962-ek/nsh/Make.defs b/configs/lm3s8962-ek/nsh/Make.defs index 671ccec32b..b0b57559c0 100644 --- a/configs/lm3s8962-ek/nsh/Make.defs +++ b/configs/lm3s8962-ek/nsh/Make.defs @@ -74,14 +74,14 @@ ifeq ($(WINTOOL),y) MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" MAXOPTIMIZATION = -O2 else # Linux/Cygwin-native toolchain MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script endif CC = $(CROSSDEV)gcc diff --git a/configs/lm3s8962-ek/nsh/ld.script b/configs/lm3s8962-ek/nsh/ld.script deleted file mode 100755 index fdf7c89689..0000000000 --- a/configs/lm3s8962-ek/nsh/ld.script +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** - * configs/lm3s8962-ek/nsh/ld.script - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/* The LM3S8962 has 256Kb of FLASH beginning at address 0x0000:0000 and 64Kb - * of SRAM beginning at 0x2000:0000. - */ - -MEMORY -{ - flash (rx) : ORIGIN = 0x00000000, LENGTH = 256K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K -} - -OUTPUT_ARCH(arm) -ENTRY(_stext) -SECTIONS -{ - .text : { - _stext = ABSOLUTE(.); - *(.vectors) - *(.text .text.*) - *(.fixup) - *(.gnu.warning) - *(.rodata .rodata.*) - *(.gnu.linkonce.t.*) - *(.glue_7) - *(.glue_7t) - *(.got) - *(.gcc_except_table) - *(.gnu.linkonce.r.*) - _etext = ABSOLUTE(.); - } > flash - - _eronly = ABSOLUTE(.); /* See below */ - - /* The LM3S6918 has 64Kb of SRAM beginning at the following address */ - - .data : { - _sdata = ABSOLUTE(.); - *(.data .data.*) - *(.gnu.linkonce.d.*) - CONSTRUCTORS - _edata = ABSOLUTE(.); - } > sram AT > flash - - .ARM.extab : { - *(.ARM.extab*) - } >sram - - .ARM.exidx : { - __exidx_start = ABSOLUTE(.); - *(.ARM.exidx*) - __exidx_end = ABSOLUTE(.); - } >sram - - .bss : { /* BSS */ - _sbss = ABSOLUTE(.); - *(.bss .bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - _ebss = ABSOLUTE(.); - } > sram - /* 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) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} diff --git a/configs/lm3s8962-ek/nx/Make.defs b/configs/lm3s8962-ek/nx/Make.defs index 2563c58dd9..7d0d0aa55b 100644 --- a/configs/lm3s8962-ek/nx/Make.defs +++ b/configs/lm3s8962-ek/nx/Make.defs @@ -74,14 +74,14 @@ ifeq ($(WINTOOL),y) MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nx/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" MAXOPTIMIZATION = -O2 else # Linux/Cygwin-native toolchain MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nx/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script endif CC = $(CROSSDEV)gcc diff --git a/configs/lm3s8962-ek/ostest/Make.defs b/configs/lm3s8962-ek/ostest/Make.defs index 2559ed89a1..50368f34f2 100644 --- a/configs/lm3s8962-ek/ostest/Make.defs +++ b/configs/lm3s8962-ek/ostest/Make.defs @@ -74,14 +74,14 @@ ifeq ($(WINTOOL),y) MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" MAXOPTIMIZATION = -O2 else # Linux/Cygwin-native toolchain MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script endif CC = $(CROSSDEV)gcc diff --git a/configs/lm3s8962-ek/ostest/ld.script b/configs/lm3s8962-ek/ostest/ld.script deleted file mode 100755 index 6aa9f5f374..0000000000 --- a/configs/lm3s8962-ek/ostest/ld.script +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** - * configs/lm3s8962-ek/ostest/ld.script - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/* The LM3S8962 has 256Kb of FLASH beginning at address 0x0000:0000 and 64Kb - * of SRAM beginning at 0x2000:0000. - */ - -MEMORY -{ - flash (rx) : ORIGIN = 0x00000000, LENGTH = 256K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K -} - -OUTPUT_ARCH(arm) -ENTRY(_stext) -SECTIONS -{ - .text : { - _stext = ABSOLUTE(.); - *(.vectors) - *(.text .text.*) - *(.fixup) - *(.gnu.warning) - *(.rodata .rodata.*) - *(.gnu.linkonce.t.*) - *(.glue_7) - *(.glue_7t) - *(.got) - *(.gcc_except_table) - *(.gnu.linkonce.r.*) - _etext = ABSOLUTE(.); - } > flash - - _eronly = ABSOLUTE(.); /* See below */ - - /* The LM3S6918 has 64Kb of SRAM beginning at the following address */ - - .data : { - _sdata = ABSOLUTE(.); - *(.data .data.*) - *(.gnu.linkonce.d.*) - CONSTRUCTORS - _edata = ABSOLUTE(.); - } > sram AT > flash - - .ARM.extab : { - *(.ARM.extab*) - } >sram - - .ARM.exidx : { - __exidx_start = ABSOLUTE(.); - *(.ARM.exidx*) - __exidx_end = ABSOLUTE(.); - } >sram - - .bss : { /* BSS */ - _sbss = ABSOLUTE(.); - *(.bss .bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - _ebss = ABSOLUTE(.); - } > sram - /* 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) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} diff --git a/configs/lm3s8962-ek/nx/ld.script b/configs/lm3s8962-ek/scripts/ld.script similarity index 91% rename from configs/lm3s8962-ek/nx/ld.script rename to configs/lm3s8962-ek/scripts/ld.script index 71f0be6c51..ccb22ddfae 100755 --- a/configs/lm3s8962-ek/nx/ld.script +++ b/configs/lm3s8962-ek/scripts/ld.script @@ -1,5 +1,5 @@ /**************************************************************************** - * configs/lm3s8962-ek/nx/ld.script + * configs/lm3s8962-ek/scripts/ld.script * * Copyright (C) 2010 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -50,10 +50,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) @@ -63,7 +63,23 @@ SECTIONS _etext = ABSOLUTE(.); } > flash - _eronly = ABSOLUTE(.); /* See below */ + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > flash + + .ARM.extab : { + *(.ARM.extab*) + } > flash + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > flash + __exidx_end = ABSOLUTE(.); + + _eronly = ABSOLUTE(.); /* The LM3S6918 has 64Kb of SRAM beginning at the following address */ @@ -75,16 +91,6 @@ SECTIONS _edata = ABSOLUTE(.); } > sram AT > flash - .ARM.extab : { - *(.ARM.extab*) - } >sram - - .ARM.exidx : { - __exidx_start = ABSOLUTE(.); - *(.ARM.exidx*) - __exidx_end = ABSOLUTE(.); - } >sram - .bss : { /* BSS */ _sbss = ABSOLUTE(.); *(.bss .bss.*) diff --git a/configs/lpc4330-xplorer/scripts/ramconfig.ld b/configs/lpc4330-xplorer/scripts/ramconfig.ld index f44d6181e2..d956120203 100644 --- a/configs/lpc4330-xplorer/scripts/ramconfig.ld +++ b/configs/lpc4330-xplorer/scripts/ramconfig.ld @@ -88,10 +88,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) @@ -101,7 +101,23 @@ SECTIONS _etext = ABSOLUTE(.); } > progmem - _eronly = ABSOLUTE(.); /* See below */ + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > progmem + + .ARM.extab : { + *(.ARM.extab*) + } > progmem + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > progmem + __exidx_end = ABSOLUTE(.); + + _eronly = ABSOLUTE(.); .data : { _sdata = ABSOLUTE(.); @@ -111,16 +127,6 @@ SECTIONS _edata = ABSOLUTE(.); } > datamem AT > progmem - .ARM.extab : { - *(.ARM.extab*) - } >datamem - - .ARM.exidx : { - __exidx_start = ABSOLUTE(.); - *(.ARM.exidx*) - __exidx_end = ABSOLUTE(.); - } >datamem - .bss : { /* BSS */ _sbss = ABSOLUTE(.); *(.bss .bss.*) diff --git a/configs/lpc4330-xplorer/scripts/spificonfig.ld b/configs/lpc4330-xplorer/scripts/spificonfig.ld index 1b8df48b2e..8ed668beec 100644 --- a/configs/lpc4330-xplorer/scripts/spificonfig.ld +++ b/configs/lpc4330-xplorer/scripts/spificonfig.ld @@ -84,10 +84,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) @@ -97,7 +97,23 @@ SECTIONS _etext = ABSOLUTE(.); } > progmem - _eronly = ABSOLUTE(.); /* See below */ + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > progmem + + .ARM.extab : { + *(.ARM.extab*) + } > progmem + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > progmem + __exidx_end = ABSOLUTE(.); + + _eronly = ABSOLUTE(.); .data : { _sdata = ABSOLUTE(.); @@ -107,16 +123,6 @@ SECTIONS _edata = ABSOLUTE(.); } > datamem AT > progmem - .ARM.extab : { - *(.ARM.extab*) - } >datamem - - .ARM.exidx : { - __exidx_start = ABSOLUTE(.); - *(.ARM.exidx*) - __exidx_end = ABSOLUTE(.); - } >datamem - .bss : { /* BSS */ _sbss = ABSOLUTE(.); *(.bss .bss.*) diff --git a/configs/lpcxpresso-lpc1768/scripts/ld.script b/configs/lpcxpresso-lpc1768/scripts/ld.script index bdfa155476..67e3a4f15a 100755 --- a/configs/lpcxpresso-lpc1768/scripts/ld.script +++ b/configs/lpcxpresso-lpc1768/scripts/ld.script @@ -53,10 +53,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) @@ -66,6 +66,22 @@ SECTIONS _etext = ABSOLUTE(.); } > flash + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > flash + + .ARM.extab : { + *(.ARM.extab*) + } > flash + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > flash + __exidx_end = ABSOLUTE(.); + _eronly = ABSOLUTE(.); .data : { @@ -76,16 +92,6 @@ SECTIONS _edata = ABSOLUTE(.); } > sram AT > flash - .ARM.extab : { - *(.ARM.extab*) - } >sram - - __exidx_start = ABSOLUTE(.); - .ARM.exidx : { - *(.ARM.exidx*) - } >sram - __exidx_end = ABSOLUTE(.); - .bss : { _sbss = ABSOLUTE(.); *(.bss .bss.*) diff --git a/configs/mbed/hidkbd/Make.defs b/configs/mbed/hidkbd/Make.defs index b1dfb73e12..92c6c7ceaa 100644 --- a/configs/mbed/hidkbd/Make.defs +++ b/configs/mbed/hidkbd/Make.defs @@ -74,14 +74,14 @@ ifeq ($(WINTOOL),y) MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/hidkbd/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" MAXOPTIMIZATION = -O2 else # Linux/Cygwin-native toolchain MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/hidkbd/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script endif CC = $(CROSSDEV)gcc diff --git a/configs/mbed/hidkbd/ld.script b/configs/mbed/hidkbd/ld.script deleted file mode 100644 index 152f8bc2a8..0000000000 --- a/configs/mbed/hidkbd/ld.script +++ /dev/null @@ -1,109 +0,0 @@ -/**************************************************************************** - * configs/olimex-lpc1766stk/hidkbd/ld.script - * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/* The LPC1766 has 256Kb of FLASH beginning at address 0x0000:0000 and - * 64Kb of total SRAM: 32Kb of SRAM in the CPU block beginning at address - * 0x10000000 and 32Kb of AHB SRAM in two banks of 16Kb beginning at addresses - * 0x20070000 and 0x20080000. Here we assume that .data and .bss will all fit - * into the 32Kb CPU SRAM address range. - */ - -MEMORY -{ - flash (rx) : ORIGIN = 0x00000000, LENGTH = 256K - sram (rwx) : ORIGIN = 0x10000000, LENGTH = 32K -} - -OUTPUT_ARCH(arm) -ENTRY(_stext) -SECTIONS -{ - .text : { - _stext = ABSOLUTE(.); - *(.vectors) - *(.text .text.*) - *(.fixup) - *(.gnu.warning) - *(.rodata .rodata.*) - *(.gnu.linkonce.t.*) - *(.glue_7) - *(.glue_7t) - *(.got) - *(.gcc_except_table) - *(.gnu.linkonce.r.*) - _etext = ABSOLUTE(.); - } > flash - - _eronly = ABSOLUTE(.); /* See below */ - - .data : { - _sdata = ABSOLUTE(.); - *(.data .data.*) - *(.gnu.linkonce.d.*) - CONSTRUCTORS - _edata = ABSOLUTE(.); - } > sram AT > flash - - .ARM.extab : { - *(.ARM.extab*) - } >sram - - .ARM.exidx : { - __exidx_start = ABSOLUTE(.); - *(.ARM.exidx*) - __exidx_end = ABSOLUTE(.); - } >sram - - .bss : { /* BSS */ - _sbss = ABSOLUTE(.); - *(.bss .bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - _ebss = ABSOLUTE(.); - } > sram - /* 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) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} diff --git a/configs/mbed/nsh/Make.defs b/configs/mbed/nsh/Make.defs index f1983a7b7c..9a72736d26 100644 --- a/configs/mbed/nsh/Make.defs +++ b/configs/mbed/nsh/Make.defs @@ -74,14 +74,14 @@ ifeq ($(WINTOOL),y) MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" MAXOPTIMIZATION = -O2 else # Linux/Cygwin-native toolchain MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script endif CC = $(CROSSDEV)gcc diff --git a/configs/nucleus2g/usbserial/ld.script b/configs/mbed/scripts/ld.script similarity index 91% rename from configs/nucleus2g/usbserial/ld.script rename to configs/mbed/scripts/ld.script index 2fa9249ff7..2d90a7608f 100755 --- a/configs/nucleus2g/usbserial/ld.script +++ b/configs/mbed/scripts/ld.script @@ -1,5 +1,5 @@ /**************************************************************************** - * configs/nucleus2g/usbserial/ld.script + * configs/nucleus2g/mbed/ld.script * * Copyright (C) 2010 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -53,10 +53,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) @@ -66,7 +66,23 @@ SECTIONS _etext = ABSOLUTE(.); } > flash - _eronly = ABSOLUTE(.); /* See below */ + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > flash + + .ARM.extab : { + *(.ARM.extab*) + } > flash + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > flash + __exidx_end = ABSOLUTE(.); + + _eronly = ABSOLUTE(.); .data : { _sdata = ABSOLUTE(.); @@ -76,16 +92,6 @@ SECTIONS _edata = ABSOLUTE(.); } > sram AT > flash - .ARM.extab : { - *(.ARM.extab*) - } >sram - - .ARM.exidx : { - __exidx_start = ABSOLUTE(.); - *(.ARM.exidx*) - __exidx_end = ABSOLUTE(.); - } >sram - .bss : { /* BSS */ _sbss = ABSOLUTE(.); *(.bss .bss.*) diff --git a/configs/mcu123-lpc214x/composite/Make.defs b/configs/mcu123-lpc214x/composite/Make.defs index fcbc0b8090..7b9b8f22ff 100644 --- a/configs/mcu123-lpc214x/composite/Make.defs +++ b/configs/mcu123-lpc214x/composite/Make.defs @@ -67,7 +67,7 @@ ifeq ($(CROSSDEV),arm-nuttx-elf-) MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/composite/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script MAXOPTIMIZATION = -Os else WINTOOL = y @@ -76,7 +76,7 @@ else MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/composite/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" MAXOPTIMIZATION = -O2 endif diff --git a/configs/mcu123-lpc214x/composite/ld.script b/configs/mcu123-lpc214x/composite/ld.script deleted file mode 100644 index 4065f29916..0000000000 --- a/configs/mcu123-lpc214x/composite/ld.script +++ /dev/null @@ -1,120 +0,0 @@ -/**************************************************************************** - * configs/mcu123-lpc214x/composite/ld.script - * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/* FLASH: - * The lpc2148 has 512Kb of non-volatile memory beginning at address - * 0x00000000. The OS entry point is via the reset vector at address - * 0x00000000 (default MEMMAP mode assumed) - * - * SRAM: - * The lpc2148 has 32Kb of on-chip static RAM beginning at address - * 0x40000000. The first 512 bytes of RAM are reserved for used by - * the bootloader. The .data section will be relocated from _eronly - * to _sdata at boot time. - */ - -MEMORY -{ - flash (rx) : ORIGIN = 0x00000000, LENGTH = 500K - sram (rw) : ORIGIN = 0x40000200, LENGTH = 32K - 512 - 32 -} - -OUTPUT_ARCH(arm) -ENTRY(_stext) -SECTIONS -{ - .text : { - _stext = ABSOLUTE(.); - *(.vectors) - *(.text .text.*) - *(.fixup) - *(.gnu.warning) - *(.rodata .rodata.*) - *(.gnu.linkonce.t.*) - *(.glue_7) - *(.glue_7t) - *(.got) - *(.gcc_except_table) - *(.gnu.linkonce.r.*) - _etext = ABSOLUTE(.); - } > flash - - /* This is where the .data section is relocated for execution out - * FLASH. The .data section will be relocated from _eronly - * to _sdata at boot time. - */ - - _eronly = ABSOLUTE(.); - - .data : { - _sdata = ABSOLUTE(.); - *(.data .data.*) - *(.gnu.linkonce.d.*) - CONSTRUCTORS - _edata = ABSOLUTE(.); - } > sram AT > flash - - .ARM.extab : { - *(.ARM.extab*) - } >sram - - __exidx_start = ABSOLUTE(.); - .ARM.exidx : { - *(.ARM.exidx*) - } >sram - __exidx_end = ABSOLUTE(.); - - .bss : { - _sbss = ABSOLUTE(.); - *(.bss .bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - _ebss = ABSOLUTE(.); - } > sram - - /* 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) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} diff --git a/configs/mcu123-lpc214x/nsh/Make.defs b/configs/mcu123-lpc214x/nsh/Make.defs index eed15974a1..ddccbb4734 100644 --- a/configs/mcu123-lpc214x/nsh/Make.defs +++ b/configs/mcu123-lpc214x/nsh/Make.defs @@ -67,7 +67,7 @@ ifeq ($(CROSSDEV),arm-nuttx-elf-) MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script MAXOPTIMIZATION = -Os else WINTOOL = y @@ -76,7 +76,7 @@ else MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" MAXOPTIMIZATION = -O2 endif diff --git a/configs/mcu123-lpc214x/ostest/Make.defs b/configs/mcu123-lpc214x/ostest/Make.defs index 46beab5265..255515a42e 100644 --- a/configs/mcu123-lpc214x/ostest/Make.defs +++ b/configs/mcu123-lpc214x/ostest/Make.defs @@ -67,7 +67,7 @@ ifeq ($(CROSSDEV),arm-nuttx-elf-) MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script MAXOPTIMIZATION = -Os else WINTOOL = y @@ -76,7 +76,7 @@ else MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" MAXOPTIMIZATION = -O2 endif diff --git a/configs/mcu123-lpc214x/ostest/ld.script b/configs/mcu123-lpc214x/ostest/ld.script deleted file mode 100644 index 590e490eb8..0000000000 --- a/configs/mcu123-lpc214x/ostest/ld.script +++ /dev/null @@ -1,119 +0,0 @@ -/**************************************************************************** - * configs/mcu123-lpc214x/ostest/ld.script - * - * Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/* FLASH: - * The lpc2148 has 512Kb of non-volatile memory beginning at address - * 0x00000000. The OS entry point is via the reset vector at address - * 0x00000000 (default MEMMAP mode assumed) - * - * SRAM: - * The lpc2148 has 32Kb of on-chip static RAM beginning at address - * 0x40000000. The .data section will be relocated from _eronly - * to _sdata at boot time. - */ - -MEMORY -{ - flash (rx) : ORIGIN = 0x00000000, LENGTH = 500K - sram (rw) : ORIGIN = 0x40000000, LENGTH = 32K - 32 -} - -OUTPUT_ARCH(arm) -ENTRY(_stext) -SECTIONS -{ - .text : { - _stext = ABSOLUTE(.); - *(.vectors) - *(.text .text.*) - *(.fixup) - *(.gnu.warning) - *(.rodata .rodata.*) - *(.gnu.linkonce.t.*) - *(.glue_7) - *(.glue_7t) - *(.got) - *(.gcc_except_table) - *(.gnu.linkonce.r.*) - _etext = ABSOLUTE(.); - } > flash - - /* This is where the .data section is relocated for execution out - * FLASH. The .data section will be relocated from _eronly - * to _sdata at boot time. - */ - - _eronly = ABSOLUTE(.); - - .data : { - _sdata = ABSOLUTE(.); - *(.data .data.*) - *(.gnu.linkonce.d.*) - CONSTRUCTORS - _edata = ABSOLUTE(.); - } > sram AT > flash - - .ARM.extab : { - *(.ARM.extab*) - } >sram - - __exidx_start = ABSOLUTE(.); - .ARM.exidx : { - *(.ARM.exidx*) - } >sram - __exidx_end = ABSOLUTE(.); - - .bss : { - _sbss = ABSOLUTE(.); - *(.bss .bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - _ebss = ABSOLUTE(.); - } > sram - - /* 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) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} diff --git a/configs/mcu123-lpc214x/nsh/ld.script b/configs/mcu123-lpc214x/scripts/ld.script similarity index 93% rename from configs/mcu123-lpc214x/nsh/ld.script rename to configs/mcu123-lpc214x/scripts/ld.script index d6128621b4..8ce83748f9 100644 --- a/configs/mcu123-lpc214x/nsh/ld.script +++ b/configs/mcu123-lpc214x/scripts/ld.script @@ -1,5 +1,5 @@ /**************************************************************************** - * configs/mcu123-lpc214x/nsh/ld.script + * configs/mcu123-lpc214x/scripts/ld.script * * Copyright (C) 2008-2009, 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -70,13 +70,24 @@ SECTIONS _etext = ABSOLUTE(.); } > flash - /* This is where the .data section is relocated for execution out - * FLASH. The .data section will be relocated from _eronly - * to _sdata at boot time. - */ + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > flash + + .ARM.extab : { + *(.ARM.extab*) + } > flash + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > flash + __exidx_end = ABSOLUTE(.); + + _eronly = ABSOLUTE(.); - _eronly = ABSOLUTE(.); - .data : { _sdata = ABSOLUTE(.); *(.data .data.*) @@ -85,16 +96,6 @@ SECTIONS _edata = ABSOLUTE(.); } > sram AT > flash - .ARM.extab : { - *(.ARM.extab*) - } >sram - - __exidx_start = ABSOLUTE(.); - .ARM.exidx : { - *(.ARM.exidx*) - } >sram - __exidx_end = ABSOLUTE(.); - .bss : { _sbss = ABSOLUTE(.); *(.bss .bss.*) diff --git a/configs/mcu123-lpc214x/usbserial/Make.defs b/configs/mcu123-lpc214x/usbserial/Make.defs index 377c39b1d4..6f05d79f73 100644 --- a/configs/mcu123-lpc214x/usbserial/Make.defs +++ b/configs/mcu123-lpc214x/usbserial/Make.defs @@ -67,7 +67,7 @@ ifeq ($(CROSSDEV),arm-nuttx-elf-) MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/usbserial/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script MAXOPTIMIZATION = -Os else WINTOOL = y @@ -76,7 +76,7 @@ else MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/usbserial/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" MAXOPTIMIZATION = -O2 endif diff --git a/configs/mcu123-lpc214x/usbserial/ld.script b/configs/mcu123-lpc214x/usbserial/ld.script deleted file mode 100644 index c73d9bda57..0000000000 --- a/configs/mcu123-lpc214x/usbserial/ld.script +++ /dev/null @@ -1,119 +0,0 @@ -/**************************************************************************** - * configs/mcu123-lpc214x/usbserial/ld.script - * - * Copyright (C) 2008-2009, 2012 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/* FLASH: - * The lpc2148 has 512Kb of non-volatile memory beginning at address - * 0x00000000. The OS entry point is via the reset vector at address - * 0x00000000 (default MEMMAP mode assumed) - * - * SRAM: - * The lpc2148 has 32Kb of on-chip static RAM beginning at address - * 0x40000000. The .data section will be relocated from _eronly - * to _sdata at boot time. - */ - -MEMORY -{ - flash (rx) : ORIGIN = 0x00000000, LENGTH = 500K - sram (rw) : ORIGIN = 0x40000000, LENGTH = 32K - 32 -} - -OUTPUT_ARCH(arm) -ENTRY(_stext) -SECTIONS -{ - .text : { - _stext = ABSOLUTE(.); - *(.vectors) - *(.text .text.*) - *(.fixup) - *(.gnu.warning) - *(.rodata .rodata.*) - *(.gnu.linkonce.t.*) - *(.glue_7) - *(.glue_7t) - *(.got) - *(.gcc_except_table) - *(.gnu.linkonce.r.*) - _etext = ABSOLUTE(.); - } > flash - - /* This is where the .data section is relocated for execution out - * FLASH. The .data section will be relocated from _eronly - * to _sdata at boot time. - */ - - _eronly = ABSOLUTE(.); - - .data : { - _sdata = ABSOLUTE(.); - *(.data .data.*) - *(.gnu.linkonce.d.*) - CONSTRUCTORS - _edata = ABSOLUTE(.); - } > sram AT > flash - - .ARM.extab : { - *(.ARM.extab*) - } >sram - - __exidx_start = ABSOLUTE(.); - .ARM.exidx : { - *(.ARM.exidx*) - } >sram - __exidx_end = ABSOLUTE(.); - - .bss : { - _sbss = ABSOLUTE(.); - *(.bss .bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - _ebss = ABSOLUTE(.); - } > sram - - /* 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) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} diff --git a/configs/mcu123-lpc214x/usbstorage/Make.defs b/configs/mcu123-lpc214x/usbstorage/Make.defs index d26a22d6fc..35ea7af7ab 100644 --- a/configs/mcu123-lpc214x/usbstorage/Make.defs +++ b/configs/mcu123-lpc214x/usbstorage/Make.defs @@ -67,7 +67,7 @@ ifeq ($(CROSSDEV),arm-nuttx-elf-) MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/usbstorage/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script MAXOPTIMIZATION = -Os else WINTOOL = y @@ -76,7 +76,7 @@ else MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/usbstorage/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" MAXOPTIMIZATION = -O2 endif diff --git a/configs/mcu123-lpc214x/usbstorage/ld.script b/configs/mcu123-lpc214x/usbstorage/ld.script deleted file mode 100644 index 41404fa6e3..0000000000 --- a/configs/mcu123-lpc214x/usbstorage/ld.script +++ /dev/null @@ -1,119 +0,0 @@ -/**************************************************************************** - * configs/mcu123-lpc214x/usbstorage/ld.script - * - * Copyright (C) 2008-2009, 2012 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/* FLASH: - * The lpc2148 has 512Kb of non-volatile memory beginning at address - * 0x00000000. The OS entry point is via the reset vector at address - * 0x00000000 (default MEMMAP mode assumed) - * - * SRAM: - * The lpc2148 has 32Kb of on-chip static RAM beginning at address - * 0x40000000. The .data section will be relocated from _eronly - * to _sdata at boot time. - */ - -MEMORY -{ - flash (rx) : ORIGIN = 0x00000000, LENGTH = 500K - sram (rw) : ORIGIN = 0x40000000, LENGTH = 32K - 32 -} - -OUTPUT_ARCH(arm) -ENTRY(_stext) -SECTIONS -{ - .text : { - _stext = ABSOLUTE(.); - *(.vectors) - *(.text .text.*) - *(.fixup) - *(.gnu.warning) - *(.rodata .rodata.*) - *(.gnu.linkonce.t.*) - *(.glue_7) - *(.glue_7t) - *(.got) - *(.gcc_except_table) - *(.gnu.linkonce.r.*) - _etext = ABSOLUTE(.); - } > flash - - /* This is where the .data section is relocated for execution out - * FLASH. The .data section will be relocated from _eronly - * to _sdata at boot time. - */ - - _eronly = ABSOLUTE(.); - - .data : { - _sdata = ABSOLUTE(.); - *(.data .data.*) - *(.gnu.linkonce.d.*) - CONSTRUCTORS - _edata = ABSOLUTE(.); - } > sram AT > flash - - .ARM.extab : { - *(.ARM.extab*) - } >sram - - __exidx_start = ABSOLUTE(.); - .ARM.exidx : { - *(.ARM.exidx*) - } >sram - __exidx_end = ABSOLUTE(.); - - .bss : { - _sbss = ABSOLUTE(.); - *(.bss .bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - _ebss = ABSOLUTE(.); - } > sram - - /* 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) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} diff --git a/configs/mirtoo/scripts/c32-debug.ld b/configs/mirtoo/scripts/c32-debug.ld index d91aa5e723..161c5b81ea 100644 --- a/configs/mirtoo/scripts/c32-debug.ld +++ b/configs/mirtoo/scripts/c32-debug.ld @@ -39,7 +39,7 @@ MEMORY /* The PIC32MX250F128D has 128Kb of program FLASH at physical address * 0x1d000000 but is always accessed at KSEG0 address 0x9d00:0000 */ - + kseg0_progmem (rx) : ORIGIN = 0x9d000000, LENGTH = 128K /* The PIC32MX250F128D has 3Kb of boot FLASH at physical addresses @@ -179,7 +179,7 @@ SECTIONS *(.gnu.linkonce.r.*) /* Small initialized constant global and static data */ - + *(.sdata2 .sdata2.*) *(.gnu.linkonce.s2.*) diff --git a/configs/mirtoo/scripts/c32-release.ld b/configs/mirtoo/scripts/c32-release.ld index 05f0ecc062..e34a3b8e12 100644 --- a/configs/mirtoo/scripts/c32-release.ld +++ b/configs/mirtoo/scripts/c32-release.ld @@ -39,7 +39,7 @@ MEMORY /* The PIC32MX250F128D has 128Kb of program FLASH at physical address * 0x1d000000 but is always accessed at KSEG0 address 0x9d00:0000 */ - + kseg0_progmem (rx) : ORIGIN = 0x9d000000, LENGTH = 128K /* The PIC32MX250F128D has 3Kb of boot FLASH at physical addresses @@ -166,8 +166,8 @@ SECTIONS .text : { _stext = ABSOLUTE(.); - *(.text .text.*) - *(.stub) + *(.text .text.*) + *(.stub) KEEP (*(.text.*personality*)) *(.gnu.linkonce.t.*) *(.gnu.warning) @@ -176,12 +176,12 @@ SECTIONS /* Read-only data is included in the text section */ - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.rodata1) *(.gnu.linkonce.r.*) /* Small initialized constant global and static data */ - + *(.sdata2 .sdata2.*) *(.gnu.linkonce.s2.*) diff --git a/configs/mirtoo/scripts/mips-elf-debug.ld b/configs/mirtoo/scripts/mips-elf-debug.ld index c08ba13c8a..990bc154b6 100644 --- a/configs/mirtoo/scripts/mips-elf-debug.ld +++ b/configs/mirtoo/scripts/mips-elf-debug.ld @@ -39,7 +39,7 @@ MEMORY /* The PIC32MX250F128D has 128Kb of program FLASH at physical address * 0x1d000000 but is always accessed at KSEG0 address 0x9d00:0000 */ - + kseg0_progmem (rx) : ORIGIN = 0x9d000000, LENGTH = 128K /* The PIC32MX250F128D has 3Kb of boot FLASH at physical addresses @@ -179,7 +179,7 @@ SECTIONS *(.gnu.linkonce.r.*) /* Small initialized constant global and static data */ - + *(.sdata2 .sdata2.*) *(.gnu.linkonce.s2.*) diff --git a/configs/mirtoo/scripts/mips-elf-release.ld b/configs/mirtoo/scripts/mips-elf-release.ld index ce64e67a55..2c3ee892fc 100644 --- a/configs/mirtoo/scripts/mips-elf-release.ld +++ b/configs/mirtoo/scripts/mips-elf-release.ld @@ -39,7 +39,7 @@ MEMORY /* The PIC32MX250F128D has 128Kb of program FLASH at physical address * 0x1d000000 but is always accessed at KSEG0 address 0x9d00:0000 */ - + kseg0_progmem (rx) : ORIGIN = 0x9d000000, LENGTH = 128K /* The PIC32MX250F128D has 3Kb of boot FLASH at physical addresses @@ -166,8 +166,8 @@ SECTIONS .text : { _stext = ABSOLUTE(.); - *(.text .text.*) - *(.stub) + *(.text .text.*) + *(.stub) KEEP (*(.text.*personality*)) *(.gnu.linkonce.t.*) *(.gnu.warning) @@ -176,12 +176,12 @@ SECTIONS /* Read-only data is included in the text section */ - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.rodata1) *(.gnu.linkonce.r.*) /* Small initialized constant global and static data */ - + *(.sdata2 .sdata2.*) *(.gnu.linkonce.s2.*) diff --git a/configs/mirtoo/scripts/xc32-debug.ld b/configs/mirtoo/scripts/xc32-debug.ld index 7582dcaab8..3c5cc949df 100644 --- a/configs/mirtoo/scripts/xc32-debug.ld +++ b/configs/mirtoo/scripts/xc32-debug.ld @@ -39,7 +39,7 @@ MEMORY /* The PIC32MX250F128D has 128Kb of program FLASH at physical address * 0x1d000000 but is always accessed at KSEG0 address 0x9d00:0000 */ - + kseg0_program_mem (rx) : ORIGIN = 0x9d000000, LENGTH = 128K /* The PIC32MX250F128D has 3Kb of boot FLASH at physical addresses @@ -179,7 +179,7 @@ SECTIONS *(.gnu.linkonce.r.*) /* Small initialized constant global and static data */ - + *(.sdata2 .sdata2.*) *(.gnu.linkonce.s2.*) diff --git a/configs/mirtoo/scripts/xc32-release.ld b/configs/mirtoo/scripts/xc32-release.ld index 2c8471ad80..b6b24cc718 100644 --- a/configs/mirtoo/scripts/xc32-release.ld +++ b/configs/mirtoo/scripts/xc32-release.ld @@ -39,7 +39,7 @@ MEMORY /* The PIC32MX250F128D has 128Kb of program FLASH at physical address * 0x1d000000 but is always accessed at KSEG0 address 0x9d00:0000 */ - + kseg0_program_mem (rx) : ORIGIN = 0x9d000000, LENGTH = 128K /* The PIC32MX250F128D has 3Kb of boot FLASH at physical addresses @@ -166,8 +166,8 @@ SECTIONS .text : { _stext = ABSOLUTE(.); - *(.text .text.*) - *(.stub) + *(.text .text.*) + *(.stub) KEEP (*(.text.*personality*)) *(.gnu.linkonce.t.*) *(.gnu.warning) @@ -176,12 +176,12 @@ SECTIONS /* Read-only data is included in the text section */ - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.rodata1) *(.gnu.linkonce.r.*) /* Small initialized constant global and static data */ - + *(.sdata2 .sdata2.*) *(.gnu.linkonce.s2.*) diff --git a/configs/ne64badge/ostest/ld.script.banked b/configs/ne64badge/ostest/ld.script.banked index 5f466e6491..9ec5f75516 100755 --- a/configs/ne64badge/ostest/ld.script.banked +++ b/configs/ne64badge/ostest/ld.script.banked @@ -94,10 +94,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(nonbanked) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) diff --git a/configs/ne64badge/ostest/ld.script.nonbanked b/configs/ne64badge/ostest/ld.script.nonbanked index dfa8b15b21..f0577a06be 100755 --- a/configs/ne64badge/ostest/ld.script.nonbanked +++ b/configs/ne64badge/ostest/ld.script.nonbanked @@ -67,10 +67,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(nonbanked) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) diff --git a/configs/nucleus2g/nsh/Make.defs b/configs/nucleus2g/nsh/Make.defs index 85e175df0d..aed194e104 100644 --- a/configs/nucleus2g/nsh/Make.defs +++ b/configs/nucleus2g/nsh/Make.defs @@ -74,14 +74,14 @@ ifeq ($(WINTOOL),y) MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" MAXOPTIMIZATION = -O2 else # Linux/Cygwin-native toolchain MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script endif CC = $(CROSSDEV)gcc diff --git a/configs/nucleus2g/nsh/ld.script b/configs/nucleus2g/nsh/ld.script deleted file mode 100755 index bc4d89cf17..0000000000 --- a/configs/nucleus2g/nsh/ld.script +++ /dev/null @@ -1,109 +0,0 @@ -/**************************************************************************** - * configs/nucleus2g/nsh/ld.script - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/* The LPC1768 has 512Kb of FLASH beginning at address 0x0000:0000 and - * 64Kb of total SRAM: 32Kb of SRAM in the CPU block beginning at address - * 0x10000000 and 32Kb of AHB SRAM in two banks of 16Kb beginning at addresses - * 0x20070000 and 0x20080000. Here we assume that .data and .bss will all fit - * into the 32Kb CPU SRAM address range. - */ - -MEMORY -{ - flash (rx) : ORIGIN = 0x00000000, LENGTH = 512K - sram (rwx) : ORIGIN = 0x10000000, LENGTH = 32K -} - -OUTPUT_ARCH(arm) -ENTRY(_stext) -SECTIONS -{ - .text : { - _stext = ABSOLUTE(.); - *(.vectors) - *(.text .text.*) - *(.fixup) - *(.gnu.warning) - *(.rodata .rodata.*) - *(.gnu.linkonce.t.*) - *(.glue_7) - *(.glue_7t) - *(.got) - *(.gcc_except_table) - *(.gnu.linkonce.r.*) - _etext = ABSOLUTE(.); - } > flash - - _eronly = ABSOLUTE(.); /* See below */ - - .data : { - _sdata = ABSOLUTE(.); - *(.data .data.*) - *(.gnu.linkonce.d.*) - CONSTRUCTORS - _edata = ABSOLUTE(.); - } > sram AT > flash - - .ARM.extab : { - *(.ARM.extab*) - } >sram - - .ARM.exidx : { - __exidx_start = ABSOLUTE(.); - *(.ARM.exidx*) - __exidx_end = ABSOLUTE(.); - } >sram - - .bss : { /* BSS */ - _sbss = ABSOLUTE(.); - *(.bss .bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - _ebss = ABSOLUTE(.); - } > sram - /* 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) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} diff --git a/configs/nucleus2g/ostest/Make.defs b/configs/nucleus2g/ostest/Make.defs index fc12eccad0..239424083b 100644 --- a/configs/nucleus2g/ostest/Make.defs +++ b/configs/nucleus2g/ostest/Make.defs @@ -74,14 +74,14 @@ ifeq ($(WINTOOL),y) MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" MAXOPTIMIZATION = -O2 else # Linux/Cygwin-native toolchain MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script endif CC = $(CROSSDEV)gcc diff --git a/configs/nucleus2g/ostest/ld.script b/configs/nucleus2g/ostest/ld.script deleted file mode 100755 index 5d3b874af2..0000000000 --- a/configs/nucleus2g/ostest/ld.script +++ /dev/null @@ -1,109 +0,0 @@ -/**************************************************************************** - * configs/nucleus2g/ostest/ld.script - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/* The LPC1768 has 512Kb of FLASH beginning at address 0x0000:0000 and - * 64Kb of total SRAM: 32Kb of SRAM in the CPU block beginning at address - * 0x10000000 and 32Kb of AHB SRAM in two banks of 16Kb beginning at addresses - * 0x20070000 and 0x20080000. Here we assume that .data and .bss will all fit - * into the 32Kb CPU SRAM address range. - */ - -MEMORY -{ - flash (rx) : ORIGIN = 0x00000000, LENGTH = 512K - sram (rwx) : ORIGIN = 0x10000000, LENGTH = 32K -} - -OUTPUT_ARCH(arm) -ENTRY(_stext) -SECTIONS -{ - .text : { - _stext = ABSOLUTE(.); - *(.vectors) - *(.text .text.*) - *(.fixup) - *(.gnu.warning) - *(.rodata .rodata.*) - *(.gnu.linkonce.t.*) - *(.glue_7) - *(.glue_7t) - *(.got) - *(.gcc_except_table) - *(.gnu.linkonce.r.*) - _etext = ABSOLUTE(.); - } > flash - - _eronly = ABSOLUTE(.); /* See below */ - - .data : { - _sdata = ABSOLUTE(.); - *(.data .data.*) - *(.gnu.linkonce.d.*) - CONSTRUCTORS - _edata = ABSOLUTE(.); - } > sram AT > flash - - .ARM.extab : { - *(.ARM.extab*) - } >sram - - .ARM.exidx : { - __exidx_start = ABSOLUTE(.); - *(.ARM.exidx*) - __exidx_end = ABSOLUTE(.); - } >sram - - .bss : { /* BSS */ - _sbss = ABSOLUTE(.); - *(.bss .bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - _ebss = ABSOLUTE(.); - } > sram - /* 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) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} diff --git a/configs/mbed/nsh/ld.script b/configs/nucleus2g/scripts/ld.script similarity index 91% rename from configs/mbed/nsh/ld.script rename to configs/nucleus2g/scripts/ld.script index d96d51dd9d..3d6fcb1d2a 100755 --- a/configs/mbed/nsh/ld.script +++ b/configs/nucleus2g/scripts/ld.script @@ -1,5 +1,5 @@ /**************************************************************************** - * configs/mbed/nsh/ld.script + * configs/nucleus2g/scripts/ld.script * * Copyright (C) 2010 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -53,10 +53,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) @@ -66,7 +66,23 @@ SECTIONS _etext = ABSOLUTE(.); } > flash - _eronly = ABSOLUTE(.); /* See below */ + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > flash + + .ARM.extab : { + *(.ARM.extab*) + } > flash + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > flash + __exidx_end = ABSOLUTE(.); + + _eronly = ABSOLUTE(.); .data : { _sdata = ABSOLUTE(.); @@ -76,16 +92,6 @@ SECTIONS _edata = ABSOLUTE(.); } > sram AT > flash - .ARM.extab : { - *(.ARM.extab*) - } >sram - - .ARM.exidx : { - __exidx_start = ABSOLUTE(.); - *(.ARM.exidx*) - __exidx_end = ABSOLUTE(.); - } >sram - .bss : { /* BSS */ _sbss = ABSOLUTE(.); *(.bss .bss.*) diff --git a/configs/nucleus2g/usbserial/Make.defs b/configs/nucleus2g/usbserial/Make.defs index d82b5d1bcc..81f17e86d2 100644 --- a/configs/nucleus2g/usbserial/Make.defs +++ b/configs/nucleus2g/usbserial/Make.defs @@ -74,14 +74,14 @@ ifeq ($(WINTOOL),y) MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/usbserial/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" MAXOPTIMIZATION = -O2 else # Linux/Cygwin-native toolchain MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/usbserial/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script endif CC = $(CROSSDEV)gcc diff --git a/configs/nucleus2g/usbstorage/Make.defs b/configs/nucleus2g/usbstorage/Make.defs index d5819e82a7..06af74d397 100644 --- a/configs/nucleus2g/usbstorage/Make.defs +++ b/configs/nucleus2g/usbstorage/Make.defs @@ -74,14 +74,14 @@ ifeq ($(WINTOOL),y) MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/usbstorage/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" MAXOPTIMIZATION = -O2 else # Linux/Cygwin-native toolchain MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/usbstorage/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script endif CC = $(CROSSDEV)gcc diff --git a/configs/nucleus2g/usbstorage/ld.script b/configs/nucleus2g/usbstorage/ld.script deleted file mode 100755 index a1056f8a7c..0000000000 --- a/configs/nucleus2g/usbstorage/ld.script +++ /dev/null @@ -1,109 +0,0 @@ -/**************************************************************************** - * configs/nucleus2g/usbstorage/ld.script - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/* The LPC1768 has 512Kb of FLASH beginning at address 0x0000:0000 and - * 64Kb of total SRAM: 32Kb of SRAM in the CPU block beginning at address - * 0x10000000 and 32Kb of AHB SRAM in two banks of 16Kb beginning at addresses - * 0x20070000 and 0x20080000. Here we assume that .data and .bss will all fit - * into the 32Kb CPU SRAM address range. - */ - -MEMORY -{ - flash (rx) : ORIGIN = 0x00000000, LENGTH = 512K - sram (rwx) : ORIGIN = 0x10000000, LENGTH = 32K -} - -OUTPUT_ARCH(arm) -ENTRY(_stext) -SECTIONS -{ - .text : { - _stext = ABSOLUTE(.); - *(.vectors) - *(.text .text.*) - *(.fixup) - *(.gnu.warning) - *(.rodata .rodata.*) - *(.gnu.linkonce.t.*) - *(.glue_7) - *(.glue_7t) - *(.got) - *(.gcc_except_table) - *(.gnu.linkonce.r.*) - _etext = ABSOLUTE(.); - } > flash - - _eronly = ABSOLUTE(.); /* See below */ - - .data : { - _sdata = ABSOLUTE(.); - *(.data .data.*) - *(.gnu.linkonce.d.*) - CONSTRUCTORS - _edata = ABSOLUTE(.); - } > sram AT > flash - - .ARM.extab : { - *(.ARM.extab*) - } >sram - - .ARM.exidx : { - __exidx_start = ABSOLUTE(.); - *(.ARM.exidx*) - __exidx_end = ABSOLUTE(.); - } >sram - - .bss : { /* BSS */ - _sbss = ABSOLUTE(.); - *(.bss .bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - _ebss = ABSOLUTE(.); - } > sram - /* 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) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} diff --git a/configs/olimex-lpc1766stk/scripts/ld.script b/configs/olimex-lpc1766stk/scripts/ld.script index 76da776894..51615624e1 100755 --- a/configs/olimex-lpc1766stk/scripts/ld.script +++ b/configs/olimex-lpc1766stk/scripts/ld.script @@ -53,10 +53,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) @@ -66,6 +66,22 @@ SECTIONS _etext = ABSOLUTE(.); } > flash + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > flash + + .ARM.extab : { + *(.ARM.extab*) + } > flash + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > flash + __exidx_end = ABSOLUTE(.); + _eronly = ABSOLUTE(.); .data : { @@ -76,16 +92,6 @@ SECTIONS _edata = ABSOLUTE(.); } > sram AT > flash - .ARM.extab : { - *(.ARM.extab*) - } >sram - - __exidx_start = ABSOLUTE(.); - .ARM.exidx : { - *(.ARM.exidx*) - } >sram - __exidx_end = ABSOLUTE(.); - .bss : { _sbss = ABSOLUTE(.); *(.bss .bss.*) diff --git a/configs/olimex-lpc2378/nsh/Make.defs b/configs/olimex-lpc2378/nsh/Make.defs index 022f3670b7..5fba7e2142 100644 --- a/configs/olimex-lpc2378/nsh/Make.defs +++ b/configs/olimex-lpc2378/nsh/Make.defs @@ -72,13 +72,13 @@ ifeq ($(WINTOOL),y) MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" else # Linux/Cygwin-native toolchain MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script endif CC = $(CROSSDEV)gcc diff --git a/configs/olimex-lpc2378/ostest/Make.defs b/configs/olimex-lpc2378/ostest/Make.defs index 043f7ad8e9..2c007cd390 100644 --- a/configs/olimex-lpc2378/ostest/Make.defs +++ b/configs/olimex-lpc2378/ostest/Make.defs @@ -72,13 +72,13 @@ ifeq ($(WINTOOL),y) MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" else # Linux/Cygwin-native toolchain MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script endif CC = $(CROSSDEV)gcc diff --git a/configs/olimex-lpc2378/ostest/ld.script b/configs/olimex-lpc2378/ostest/ld.script deleted file mode 100755 index e9ffbb4508..0000000000 --- a/configs/olimex-lpc2378/ostest/ld.script +++ /dev/null @@ -1,166 +0,0 @@ -/**************************************************************************** - * configs/olimex-lpc2378/ostest/ld.script - * - * Copyright (C) 2010 Rommel Marcelo. All rights reserved. - * Author: Rommel Marcelo - * - * This is part of the NuttX RTOS and based on the LPC2148 port: - * - * Copyright (C) 2010, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ -MEMORY -{ - ROM (rx) : ORIGIN = 0x00000000, LENGTH = (512k-8k) /* Flash: 512k - boot code */ - RAM (rw) : ORIGIN = 0x40000000, LENGTH = (32k-32) /* SRAM: 32k - IAP work */ - URAM (rw) : ORIGIN = 0x7FD00000, LENGTH = (8k) /* USB RAM: 8k */ - ERAM (rw) : ORIGIN = 0x7FE00000, LENGTH = (16k) /* Ethernet RAM: 16k */ - BRAM (rw) : ORIGIN = 0xE0084000, LENGTH = (2k) /* Battery RAM: 2k */ -} - -OUTPUT_ARCH(arm) -ENTRY(_stext) -SECTIONS -{ - .text : { - _stext = ABSOLUTE(.); - *(.vectors) /* Startup code */ - *(.text .text.*) /* remaining code */ - *(.fixup) - *(.gnu.warning) - *(.rodata .rodata.*) /* read-only data (constants) */ - *(.gnu.linkonce.t.*) - *(.glue_7) - *(.glue_7t) - *(.got) - *(.gcc_except_table) - *(.gnu.linkonce.r.*) - _etext = ABSOLUTE(.); - . = ALIGN(4); - } > ROM - - /* This is where the .data section is relocated for execution out - * FLASH. The .data section will be relocated from _eronly - * to _sdata at boot time. - */ - . = ALIGN(4); - _eronly = ABSOLUTE(.); - - .data : - { - _sdata = ABSOLUTE(.); - *(.data .data.*) - *(.gnu.linkonce.d.*) - CONSTRUCTORS - _edata = ABSOLUTE(.); - } > RAM AT > ROM - - .ARM.extab : { - *(.ARM.extab*) - } > RAM - - __exidx_start = ABSOLUTE(.); - .ARM.exidx : { - *(.ARM.exidx*) - } > RAM - __exidx_end = ABSOLUTE(.); - - -/* .bss section which is initialized by 0 */ - /* This section will be filled with zero by startup code */ - .bss (NOLOAD) : - { - _sbss = ABSOLUTE(.) ; - *(.bss) - *(.bss.*) - *(.gnu.linkonce.b*) - *(COMMON) - _ebss = ABSOLUTE(.); - } > RAM - - .usbram (NOLOAD) : - { - __usbram_start = . ; - __usbram_start__ = . ; - *(.usbram) - . = ALIGN(4); - } > URAM - - .etherram (NOLOAD) : - { - __etherram_start = . ; - __etherram_start__ = . ; - *(.etherram) - . = ALIGN(4); - } > ERAM - - .batteryram (NOLOAD) : - { - __batteryram_start = . ; - __batteryram_start__ = . ; - *(.batteryram) - . = ALIGN(4); - } > BRAM - - /* 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 .gnu.linkonce.wi.*) } - .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) } -} diff --git a/configs/olimex-lpc2378/nsh/ld.script b/configs/olimex-lpc2378/scripts/ld.script similarity index 92% rename from configs/olimex-lpc2378/nsh/ld.script rename to configs/olimex-lpc2378/scripts/ld.script index d591fcd663..8434249b6e 100755 --- a/configs/olimex-lpc2378/nsh/ld.script +++ b/configs/olimex-lpc2378/scripts/ld.script @@ -1,5 +1,5 @@ /**************************************************************************** - * configs/olimex-lpc2378/nsh/ld.script + * configs/olimex-lpc2378/scripts/ld.script * * Copyright (C) 2010 Rommel Marcelo. All rights reserved. * Author: Rommel Marcelo @@ -52,11 +52,11 @@ SECTIONS { .text : { _stext = ABSOLUTE(.); - *(.vectors) /* Startup code */ - *(.text .text.*) /* remaining code */ + *(.vectors) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) /* read-only data (constants) */ + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) @@ -64,16 +64,26 @@ SECTIONS *(.gcc_except_table) *(.gnu.linkonce.r.*) _etext = ABSOLUTE(.); - . = ALIGN(4); } > ROM - /* This is where the .data section is relocated for execution out - * FLASH. The .data section will be relocated from _eronly - * to _sdata at boot time. - */ - . = ALIGN(4); + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > ROM + + .ARM.extab : { + *(.ARM.extab*) + } > ROM + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > ROM + __exidx_end = ABSOLUTE(.); + _eronly = ABSOLUTE(.); - + .data : { _sdata = ABSOLUTE(.); @@ -83,16 +93,6 @@ SECTIONS _edata = ABSOLUTE(.); } > RAM AT > ROM - .ARM.extab : { - *(.ARM.extab*) - } > RAM - - __exidx_start = ABSOLUTE(.); - .ARM.exidx : { - *(.ARM.exidx*) - } > RAM - __exidx_end = ABSOLUTE(.); - /* .bss section which is initialized by 0 */ /* This section will be filled with zero by startup code */ .bss (NOLOAD) : diff --git a/configs/olimex-stm32-p107/scripts/ld.script b/configs/olimex-stm32-p107/scripts/ld.script index 5037954bae..651848df71 100644 --- a/configs/olimex-stm32-p107/scripts/ld.script +++ b/configs/olimex-stm32-p107/scripts/ld.script @@ -47,10 +47,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) @@ -60,6 +60,22 @@ SECTIONS _etext = ABSOLUTE(.); } > flash + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > flash + + .ARM.extab : { + *(.ARM.extab*) + } > flash + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > flash + __exidx_end = ABSOLUTE(.); + _eronly = ABSOLUTE(.); /* The STM32F107VC has 64Kb of SRAM beginning at the following address */ @@ -72,16 +88,6 @@ SECTIONS _edata = ABSOLUTE(.); } > sram AT > flash - .ARM.extab : { - *(.ARM.extab*) - } >sram - - __exidx_start = ABSOLUTE(.); - .ARM.exidx : { - *(.ARM.exidx*) - } >sram - __exidx_end = ABSOLUTE(.); - .bss : { _sbss = ABSOLUTE(.); *(.bss .bss.*) diff --git a/configs/olimex-stm32-p107/scripts/ld.script.dfu b/configs/olimex-stm32-p107/scripts/ld.script.dfu index 87acb12f90..c20a6224fa 100644 --- a/configs/olimex-stm32-p107/scripts/ld.script.dfu +++ b/configs/olimex-stm32-p107/scripts/ld.script.dfu @@ -47,10 +47,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) @@ -60,6 +60,22 @@ SECTIONS _etext = ABSOLUTE(.); } > flash + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > flash + + .ARM.extab : { + *(.ARM.extab*) + } > flash + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > flash + __exidx_end = ABSOLUTE(.); + _eronly = ABSOLUTE(.); /* The STM32F103Z has 64Kb of SRAM beginning at the following address */ @@ -72,16 +88,6 @@ SECTIONS _edata = ABSOLUTE(.); } > sram AT > flash - .ARM.extab : { - *(.ARM.extab*) - } >sram - - __exidx_start = ABSOLUTE(.); - .ARM.exidx : { - *(.ARM.exidx*) - } >sram - __exidx_end = ABSOLUTE(.); - .bss : { _sbss = ABSOLUTE(.); *(.bss .bss.*) diff --git a/configs/olimex-strp711/nettest/Make.defs b/configs/olimex-strp711/nettest/Make.defs index 1c751be09d..64259e9199 100644 --- a/configs/olimex-strp711/nettest/Make.defs +++ b/configs/olimex-strp711/nettest/Make.defs @@ -67,7 +67,7 @@ ifeq ($(CROSSDEV),arm-nuttx-elf-) MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nettest/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script MAXOPTIMIZATION = -Os else WINTOOL = y @@ -76,7 +76,7 @@ else MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nettest/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" MAXOPTIMIZATION = -O2 endif diff --git a/configs/olimex-strp711/nsh/Make.defs b/configs/olimex-strp711/nsh/Make.defs index d2c674d3a5..69c6b4c277 100644 --- a/configs/olimex-strp711/nsh/Make.defs +++ b/configs/olimex-strp711/nsh/Make.defs @@ -67,7 +67,7 @@ ifeq ($(CROSSDEV),arm-nuttx-elf-) MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script MAXOPTIMIZATION = -Os else WINTOOL = y @@ -76,7 +76,7 @@ else MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" MAXOPTIMIZATION = -O2 endif diff --git a/configs/olimex-strp711/nsh/ld.script b/configs/olimex-strp711/nsh/ld.script deleted file mode 100644 index 7a95410f47..0000000000 --- a/configs/olimex-strp711/nsh/ld.script +++ /dev/null @@ -1,122 +0,0 @@ -/**************************************************************************** - * configs/olimex-strp711/nsh/ld.script - * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/* The str71x has 256Kb of non-volatile memory beginning at address - * 0x4000:0000 for program storage (Bank0, an addition 16Kb is available - * for data storage in Bank1). The OS entry point is via the reset vector - * at address 0x00000000 where the FLASH is remapped at reset. - * - * The str71x has 64Kb of on-chip static RAM beginning at address - * 0x2000:0000. The .data section will be relocated from _eronly - * to _sdata at boot time. - */ - -/* The STR711 has 256Kb of FLASH beginning at address 0x4000:0000 and 64Kb - * of SRAM beginning at address 0x2000:0000 - */ - -MEMORY -{ - flash (rx) : ORIGIN = 0x40000000, LENGTH = 256K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K -} - -OUTPUT_ARCH(arm) -ENTRY(_stext) -SECTIONS -{ - .text : { - _stext = ABSOLUTE(.); - *(.vectors) - *(.text .text.*) - *(.fixup) - *(.gnu.warning) - *(.rodata .rodata.*) - *(.gnu.linkonce.t.*) - *(.glue_7) - *(.glue_7t) - *(.got) - *(.gcc_except_table) - *(.gnu.linkonce.r.*) - _etext = ABSOLUTE(.); - } > flash - - /* This is where the .data section is relocated for execution out - * FLASH. The .data section will be relocated from _eronly - * to _sdata at boot time. - */ - - _eronly = ABSOLUTE(.); - - .data : { - _sdata = ABSOLUTE(.); - *(.data .data.*) - *(.gnu.linkonce.d.*) - CONSTRUCTORS - _edata = ABSOLUTE(.); - } > sram AT > flash - - .ARM.extab : { - *(.ARM.extab*) - } >sram - - .ARM.exidx : { - __exidx_start = ABSOLUTE(.); - *(.ARM.exidx*) - __exidx_end = ABSOLUTE(.); - } >sram - - .bss : { - _sbss = ABSOLUTE(.); - *(.bss .bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - _ebss = ABSOLUTE(.); - } > sram - - /* 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) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} diff --git a/configs/olimex-strp711/ostest/Make.defs b/configs/olimex-strp711/ostest/Make.defs index 37adf602a4..722a45951e 100644 --- a/configs/olimex-strp711/ostest/Make.defs +++ b/configs/olimex-strp711/ostest/Make.defs @@ -67,7 +67,7 @@ ifeq ($(CROSSDEV),arm-nuttx-elf-) MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script MAXOPTIMIZATION = -Os else WINTOOL = y @@ -76,7 +76,7 @@ else MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" MAXOPTIMIZATION = -O2 endif diff --git a/configs/olimex-strp711/ostest/ld.script b/configs/olimex-strp711/ostest/ld.script deleted file mode 100644 index 9a5c457453..0000000000 --- a/configs/olimex-strp711/ostest/ld.script +++ /dev/null @@ -1,122 +0,0 @@ -/**************************************************************************** - * configs/olimex-strp711/ostest/ld.script - * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/* The str71x has 256Kb of non-volatile memory beginning at address - * 0x4000:0000 for program storage (Bank0, an addition 16Kb is available - * for data storage in Bank1). The OS entry point is via the reset vector - * at address 0x00000000 where the FLASH is remapped at reset. - * - * The str71x has 64Kb of on-chip static RAM beginning at address - * 0x2000:0000. The .data section will be relocated from _eronly - * to _sdata at boot time. - */ - -/* The STR711 has 256Kb of FLASH beginning at address 0x4000:0000 and 64Kb - * of SRAM beginning at address 0x2000:0000 - */ - -MEMORY -{ - flash (rx) : ORIGIN = 0x40000000, LENGTH = 256K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K -} - -OUTPUT_ARCH(arm) -ENTRY(_stext) -SECTIONS -{ - .text : { - _stext = ABSOLUTE(.); - *(.vectors) - *(.text .text.*) - *(.fixup) - *(.gnu.warning) - *(.rodata .rodata.*) - *(.gnu.linkonce.t.*) - *(.glue_7) - *(.glue_7t) - *(.got) - *(.gcc_except_table) - *(.gnu.linkonce.r.*) - _etext = ABSOLUTE(.); - } > flash - - /* This is where the .data section is relocated for execution out - * FLASH. The .data section will be relocated from _eronly - * to _sdata at boot time. - */ - - _eronly = ABSOLUTE(.); - - .data : { - _sdata = ABSOLUTE(.); - *(.data .data.*) - *(.gnu.linkonce.d.*) - CONSTRUCTORS - _edata = ABSOLUTE(.); - } > sram AT > flash - - .ARM.extab : { - *(.ARM.extab*) - } >sram - - .ARM.exidx : { - __exidx_start = ABSOLUTE(.); - *(.ARM.exidx*) - __exidx_end = ABSOLUTE(.); - } >sram - - .bss : { - _sbss = ABSOLUTE(.); - *(.bss .bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - _ebss = ABSOLUTE(.); - } > sram - - /* 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) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} diff --git a/configs/olimex-strp711/nettest/ld.script b/configs/olimex-strp711/scripts/ld.script similarity index 91% rename from configs/olimex-strp711/nettest/ld.script rename to configs/olimex-strp711/scripts/ld.script index b3b5c6ff87..2717592dc7 100755 --- a/configs/olimex-strp711/nettest/ld.script +++ b/configs/olimex-strp711/scripts/ld.script @@ -1,5 +1,5 @@ /**************************************************************************** - * configs/olimex-strp711/nettest/ld.script + * configs/olimex-strp711/scripts/ld.script * * Copyright (C) 2010 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -73,13 +73,24 @@ SECTIONS _etext = ABSOLUTE(.); } > flash - /* This is where the .data section is relocated for execution out - * FLASH. The .data section will be relocated from _eronly - * to _sdata at boot time. - */ + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > flash + + .ARM.extab : { + *(.ARM.extab*) + } > flash + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > flash + __exidx_end = ABSOLUTE(.); + + _eronly = ABSOLUTE(.); - _eronly = ABSOLUTE(.); - .data : { _sdata = ABSOLUTE(.); *(.data .data.*) @@ -88,16 +99,6 @@ SECTIONS _edata = ABSOLUTE(.); } > sram AT > flash - .ARM.extab : { - *(.ARM.extab*) - } >sram - - .ARM.exidx : { - __exidx_start = ABSOLUTE(.); - *(.ARM.exidx*) - __exidx_end = ABSOLUTE(.); - } >sram - .bss : { _sbss = ABSOLUTE(.); *(.bss .bss.*) diff --git a/configs/pcblogic-pic32mx/nsh/ld.script b/configs/pcblogic-pic32mx/nsh/ld.script index ff1618acfb..f80cc04365 100644 --- a/configs/pcblogic-pic32mx/nsh/ld.script +++ b/configs/pcblogic-pic32mx/nsh/ld.script @@ -39,7 +39,7 @@ MEMORY /* The PIC32MX460F512L has 512Kb of program FLASH at physical address * 0x1d000000 but is always accessed at KSEG0 address 0x9d00:0000 */ - + kseg0_progmem (rx) : ORIGIN = 0x9d000000, LENGTH = 512K /* The PIC32MX460F512L has 12Kb of boot FLASH at physical address @@ -168,8 +168,8 @@ SECTIONS .text : { _stext = ABSOLUTE(.); - *(.text .text.*) - *(.stub) + *(.text .text.*) + *(.stub) KEEP (*(.text.*personality*)) *(.gnu.linkonce.t.*) *(.gnu.warning) @@ -178,12 +178,12 @@ SECTIONS /* Read-only data is included in the text section */ - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.rodata1) *(.gnu.linkonce.r.*) /* Small initialized constant global and static data */ - + *(.sdata2 .sdata2.*) *(.gnu.linkonce.s2.*) diff --git a/configs/pcblogic-pic32mx/ostest/ld.script b/configs/pcblogic-pic32mx/ostest/ld.script index dd181b4d98..93e9320658 100644 --- a/configs/pcblogic-pic32mx/ostest/ld.script +++ b/configs/pcblogic-pic32mx/ostest/ld.script @@ -39,7 +39,7 @@ MEMORY /* The PIC32MX460F512L has 512Kb of program FLASH at physical address * 0x1d000000 but is always accessed at KSEG0 address 0x9d00:0000 */ - + kseg0_progmem (rx) : ORIGIN = 0x9d000000, LENGTH = 512K /* The PIC32MX460F512L has 12Kb of boot FLASH at physical address @@ -168,8 +168,8 @@ SECTIONS .text : { _stext = ABSOLUTE(.); - *(.text .text.*) - *(.stub) + *(.text .text.*) + *(.stub) KEEP (*(.text.*personality*)) *(.gnu.linkonce.t.*) *(.gnu.warning) @@ -178,12 +178,12 @@ SECTIONS /* Read-only data is included in the text section */ - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.rodata1) *(.gnu.linkonce.r.*) /* Small initialized constant global and static data */ - + *(.sdata2 .sdata2.*) *(.gnu.linkonce.s2.*) diff --git a/configs/pic32-starterkit/nsh/ld.script b/configs/pic32-starterkit/nsh/ld.script index 88f722064a..3e5ea6e039 100644 --- a/configs/pic32-starterkit/nsh/ld.script +++ b/configs/pic32-starterkit/nsh/ld.script @@ -39,7 +39,7 @@ MEMORY /* The PIC32MX795F512L has 512Kb of program FLASH at physical address * 0x1d000000 but is always accessed at KSEG0 address 0x9d00:0000 */ - + kseg0_progmem (rx) : ORIGIN = 0x9d000000, LENGTH = 512K /* The PIC32MX795F512L has 12Kb of boot FLASH at physical address @@ -168,8 +168,8 @@ SECTIONS .text : { _stext = ABSOLUTE(.); - *(.text .text.*) - *(.stub) + *(.text .text.*) + *(.stub) KEEP (*(.text.*personality*)) *(.gnu.linkonce.t.*) *(.gnu.warning) @@ -178,12 +178,12 @@ SECTIONS /* Read-only data is included in the text section */ - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.rodata1) *(.gnu.linkonce.r.*) /* Small initialized constant global and static data */ - + *(.sdata2 .sdata2.*) *(.gnu.linkonce.s2.*) diff --git a/configs/pic32-starterkit/nsh2/ld.script b/configs/pic32-starterkit/nsh2/ld.script index 1f07ee6514..1c9511cc45 100644 --- a/configs/pic32-starterkit/nsh2/ld.script +++ b/configs/pic32-starterkit/nsh2/ld.script @@ -39,7 +39,7 @@ MEMORY /* The PIC32MX795F512L has 512Kb of program FLASH at physical address * 0x1d000000 but is always accessed at KSEG0 address 0x9d00:0000 */ - + kseg0_progmem (rx) : ORIGIN = 0x9d000000, LENGTH = 512K /* The PIC32MX795F512L has 12Kb of boot FLASH at physical address @@ -168,8 +168,8 @@ SECTIONS .text : { _stext = ABSOLUTE(.); - *(.text .text.*) - *(.stub) + *(.text .text.*) + *(.stub) KEEP (*(.text.*personality*)) *(.gnu.linkonce.t.*) *(.gnu.warning) @@ -178,12 +178,12 @@ SECTIONS /* Read-only data is included in the text section */ - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.rodata1) *(.gnu.linkonce.r.*) /* Small initialized constant global and static data */ - + *(.sdata2 .sdata2.*) *(.gnu.linkonce.s2.*) diff --git a/configs/pic32-starterkit/ostest/ld.script b/configs/pic32-starterkit/ostest/ld.script index d2c1f162b5..45712df4d4 100644 --- a/configs/pic32-starterkit/ostest/ld.script +++ b/configs/pic32-starterkit/ostest/ld.script @@ -39,7 +39,7 @@ MEMORY /* The PIC32MX795F512L has 512Kb of program FLASH at physical address * 0x1d000000 but is always accessed at KSEG0 address 0x9d00:0000 */ - + kseg0_progmem (rx) : ORIGIN = 0x9d000000, LENGTH = 512K /* The PIC32MX795F512L has 12Kb of boot FLASH at physical address @@ -168,8 +168,8 @@ SECTIONS .text : { _stext = ABSOLUTE(.); - *(.text .text.*) - *(.stub) + *(.text .text.*) + *(.stub) KEEP (*(.text.*personality*)) *(.gnu.linkonce.t.*) *(.gnu.warning) @@ -178,12 +178,12 @@ SECTIONS /* Read-only data is included in the text section */ - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.rodata1) *(.gnu.linkonce.r.*) /* Small initialized constant global and static data */ - + *(.sdata2 .sdata2.*) *(.gnu.linkonce.s2.*) diff --git a/configs/pic32mx7mmb/nsh/ld.script b/configs/pic32mx7mmb/nsh/ld.script index a3ffbe91a7..f6ec304c3e 100644 --- a/configs/pic32mx7mmb/nsh/ld.script +++ b/configs/pic32mx7mmb/nsh/ld.script @@ -39,7 +39,7 @@ MEMORY /* The PIC32MX795F512L has 512Kb of program FLASH at physical address * 0x1d000000 but is always accessed at KSEG0 address 0x9d00:0000 */ - + kseg0_progmem (rx) : ORIGIN = 0x9d000000, LENGTH = 512K /* The PIC32MX795F512L has 12Kb of boot FLASH at physical address @@ -168,8 +168,8 @@ SECTIONS .text : { _stext = ABSOLUTE(.); - *(.text .text.*) - *(.stub) + *(.text .text.*) + *(.stub) KEEP (*(.text.*personality*)) *(.gnu.linkonce.t.*) *(.gnu.warning) @@ -178,12 +178,12 @@ SECTIONS /* Read-only data is included in the text section */ - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.rodata1) *(.gnu.linkonce.r.*) /* Small initialized constant global and static data */ - + *(.sdata2 .sdata2.*) *(.gnu.linkonce.s2.*) diff --git a/configs/pic32mx7mmb/ostest/ld.script b/configs/pic32mx7mmb/ostest/ld.script index a01074d21c..7f27c6adcf 100644 --- a/configs/pic32mx7mmb/ostest/ld.script +++ b/configs/pic32mx7mmb/ostest/ld.script @@ -39,7 +39,7 @@ MEMORY /* The PIC32MX795F512L has 512Kb of program FLASH at physical address * 0x1d000000 but is always accessed at KSEG0 address 0x9d00:0000 */ - + kseg0_progmem (rx) : ORIGIN = 0x9d000000, LENGTH = 512K /* The PIC32MX795F512L has 12Kb of boot FLASH at physical address @@ -168,8 +168,8 @@ SECTIONS .text : { _stext = ABSOLUTE(.); - *(.text .text.*) - *(.stub) + *(.text .text.*) + *(.stub) KEEP (*(.text.*personality*)) *(.gnu.linkonce.t.*) *(.gnu.warning) @@ -178,12 +178,12 @@ SECTIONS /* Read-only data is included in the text section */ - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.rodata1) *(.gnu.linkonce.r.*) /* Small initialized constant global and static data */ - + *(.sdata2 .sdata2.*) *(.gnu.linkonce.s2.*) diff --git a/configs/qemu-i486/nsh/ld.script b/configs/qemu-i486/nsh/ld.script index 3fffc84592..ddab1327e9 100755 --- a/configs/qemu-i486/nsh/ld.script +++ b/configs/qemu-i486/nsh/ld.script @@ -41,14 +41,14 @@ SECTIONS .text : { _stext = ABSOLUTE(.); - *(.text .text.*) + *(.text .text.*) *(.gnu.linkonce.t.*) _etext = ABSOLUTE(.); } .text ALIGN (0x1000) : { _srodata = ABSOLUTE(.); - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.fixup) *(.gnu.warning) *(.glue_7) diff --git a/configs/qemu-i486/ostest/ld.script b/configs/qemu-i486/ostest/ld.script index d597710783..e6e1c90e7b 100755 --- a/configs/qemu-i486/ostest/ld.script +++ b/configs/qemu-i486/ostest/ld.script @@ -41,14 +41,14 @@ SECTIONS .text : { _stext = ABSOLUTE(.); - *(.text .text.*) + *(.text .text.*) *(.gnu.linkonce.t.*) _etext = ABSOLUTE(.); } .text ALIGN (0x1000) : { _srodata = ABSOLUTE(.); - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.fixup) *(.gnu.warning) *(.glue_7) diff --git a/configs/sam3u-ek/kernel/kernel.ld b/configs/sam3u-ek/kernel/kernel.ld index 9388bf88c2..93d16124a6 100644 --- a/configs/sam3u-ek/kernel/kernel.ld +++ b/configs/sam3u-ek/kernel/kernel.ld @@ -33,7 +33,7 @@ * ****************************************************************************/ -/* The AT91SAM3U-4 has 256Kb of FLASH beginning at address 0x0008:0000, +/* The AT91SAM3U-4 has 256Kb of FLASH beginning at address 0x0008:0000, * 32Kb of SRAM beginning at address 0x2000:0000, and 16Kb of SRAM beginning * at address 0x2008:000 (used only for heap). When booting from FLASH, * FLASH memory is aliased to address 0x0000:0000 where the code expects to @@ -89,10 +89,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) @@ -102,6 +102,22 @@ SECTIONS _etext = ABSOLUTE(.); } > uflash + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > uflash + + .ARM.extab : { + *(.ARM.extab*) + } > uflash + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > uflash + __exidx_end = ABSOLUTE(.); + _eronly = ABSOLUTE(.); .data : { @@ -112,16 +128,6 @@ SECTIONS _edata = ABSOLUTE(.); } > usram1 AT > uflash - .ARM.extab : { - *(.ARM.extab*) - } >usram1 - - .ARM.exidx : { - __exidx_start = ABSOLUTE(.); - *(.ARM.exidx*) - __exidx_end = ABSOLUTE(.); - } >usram1 - .bss : { _sbss = ABSOLUTE(.); *(.bss .bss.*) diff --git a/configs/sam3u-ek/knsh/ld.script b/configs/sam3u-ek/knsh/ld.script index 34c4fbb322..e24a5bcbf8 100755 --- a/configs/sam3u-ek/knsh/ld.script +++ b/configs/sam3u-ek/knsh/ld.script @@ -33,7 +33,7 @@ * ****************************************************************************/ -/* The AT91SAM3U-4 has 256Kb of FLASH beginning at address 0x0008:0000, +/* The AT91SAM3U-4 has 256Kb of FLASH beginning at address 0x0008:0000, * 32Kb of SRAM beginning at address 0x2000:0000, and 16Kb of SRAM beginning * at address 0x2008:000 (used only for heap). When booting from FLASH, * FLASH memory is aliased to address 0x0000:0000 where the code expects to @@ -69,10 +69,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) @@ -82,6 +82,22 @@ SECTIONS _etext = ABSOLUTE(.); } > kflash + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > kflash + + .ARM.extab : { + *(.ARM.extab*) + } > kflash + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > kflash + __exidx_end = ABSOLUTE(.); + _eronly = ABSOLUTE(.); .data : { @@ -92,16 +108,6 @@ SECTIONS _edata = ABSOLUTE(.); } > ksram1 AT > kflash - .ARM.extab : { - *(.ARM.extab*) - } >ksram1 - - .ARM.exidx : { - __exidx_start = ABSOLUTE(.); - *(.ARM.exidx*) - __exidx_end = ABSOLUTE(.); - } >ksram1 - .bss : { _sbss = ABSOLUTE(.); *(.bss .bss.*) diff --git a/configs/sam3u-ek/nsh/Make.defs b/configs/sam3u-ek/nsh/Make.defs index 5bf989aad8..337b98df84 100644 --- a/configs/sam3u-ek/nsh/Make.defs +++ b/configs/sam3u-ek/nsh/Make.defs @@ -74,14 +74,14 @@ ifeq ($(WINTOOL),y) MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" MAXOPTIMIZATION = -O2 else # Linux/Cygwin-native toolchain MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script endif CC = $(CROSSDEV)gcc diff --git a/configs/sam3u-ek/nsh/ld.script b/configs/sam3u-ek/nsh/ld.script deleted file mode 100755 index 94ae474033..0000000000 --- a/configs/sam3u-ek/nsh/ld.script +++ /dev/null @@ -1,111 +0,0 @@ -/**************************************************************************** - * configs/sam3u-ek/nsh/ld.script - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/* The AT91SAM3U-4 has 256Kb of FLASH beginning at address 0x0008:0000, - * 32Kb of SRAM beginning at address 0x2000:0000, and 16Kb of SRAM beginning - * at address 0x2008:000 (used only for heap). When booting from FLASH, - * FLASH memory is aliased to address 0x0000:0000 where the code expects to - * begin execution by jumping to the entry point in the 0x0800:0000 address - * range. - */ - -MEMORY -{ - flash (rx) : ORIGIN = 0x00080000, LENGTH = 256K - sram1 (rwx) : ORIGIN = 0x20000000, LENGTH = 32K - sram2 (rwx) : ORIGIN = 0x20080000, LENGTH = 16K -} - -OUTPUT_ARCH(arm) -ENTRY(_stext) -SECTIONS -{ - .text : { - _stext = ABSOLUTE(.); - *(.vectors) - *(.text .text.*) - *(.fixup) - *(.gnu.warning) - *(.rodata .rodata.*) - *(.gnu.linkonce.t.*) - *(.glue_7) - *(.glue_7t) - *(.got) - *(.gcc_except_table) - *(.gnu.linkonce.r.*) - _etext = ABSOLUTE(.); - } > flash - - _eronly = ABSOLUTE(.); /* See below */ - - .data : { - _sdata = ABSOLUTE(.); - *(.data .data.*) - *(.gnu.linkonce.d.*) - CONSTRUCTORS - _edata = ABSOLUTE(.); - } > sram1 AT > flash - - .ARM.extab : { - *(.ARM.extab*) - } >sram1 - - .ARM.exidx : { - __exidx_start = ABSOLUTE(.); - *(.ARM.exidx*) - __exidx_end = ABSOLUTE(.); - } >sram1 - - .bss : { /* BSS */ - _sbss = ABSOLUTE(.); - *(.bss .bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - _ebss = ABSOLUTE(.); - } > sram1 - /* 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) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} diff --git a/configs/sam3u-ek/nx/Make.defs b/configs/sam3u-ek/nx/Make.defs index e4140a1103..86a1c5c38e 100644 --- a/configs/sam3u-ek/nx/Make.defs +++ b/configs/sam3u-ek/nx/Make.defs @@ -74,14 +74,14 @@ ifeq ($(WINTOOL),y) MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nx/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" MAXOPTIMIZATION = -O2 else # Linux/Cygwin-native toolchain MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nx/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script endif CC = $(CROSSDEV)gcc diff --git a/configs/sam3u-ek/ostest/Make.defs b/configs/sam3u-ek/ostest/Make.defs index 8c765976b1..25f386df75 100644 --- a/configs/sam3u-ek/ostest/Make.defs +++ b/configs/sam3u-ek/ostest/Make.defs @@ -74,14 +74,14 @@ ifeq ($(WINTOOL),y) MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" MAXOPTIMIZATION = -O2 else # Linux/Cygwin-native toolchain MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script endif CC = $(CROSSDEV)gcc diff --git a/configs/sam3u-ek/ostest/ld.script b/configs/sam3u-ek/ostest/ld.script deleted file mode 100755 index 70fd611e74..0000000000 --- a/configs/sam3u-ek/ostest/ld.script +++ /dev/null @@ -1,111 +0,0 @@ -/**************************************************************************** - * configs/sam3u-ek/ostest/ld.script - * - * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/* The AT91SAM3U-4 has 256Kb of FLASH beginning at address 0x0008:0000, - * 32Kb of SRAM beginning at address 0x2000:0000, and 16Kb of SRAM beginning - * at address 0x2008:000 (used only for heap). When booting from FLASH, - * FLASH memory is aliased to address 0x0000:0000 where the code expects to - * begin execution by jumping to the entry point in the 0x0800:0000 address - * range. - */ - -MEMORY -{ - flash (rx) : ORIGIN = 0x00080000, LENGTH = 256K - sram1 (rwx) : ORIGIN = 0x20000000, LENGTH = 32K - sram2 (rwx) : ORIGIN = 0x20080000, LENGTH = 16K -} - -OUTPUT_ARCH(arm) -ENTRY(_stext) -SECTIONS -{ - .text : { - _stext = ABSOLUTE(.); - *(.vectors) - *(.text .text.*) - *(.fixup) - *(.gnu.warning) - *(.rodata .rodata.*) - *(.gnu.linkonce.t.*) - *(.glue_7) - *(.glue_7t) - *(.got) - *(.gcc_except_table) - *(.gnu.linkonce.r.*) - _etext = ABSOLUTE(.); - } > flash - - _eronly = ABSOLUTE(.); /* See below */ - - .data : { - _sdata = ABSOLUTE(.); - *(.data .data.*) - *(.gnu.linkonce.d.*) - CONSTRUCTORS - _edata = ABSOLUTE(.); - } > sram1 AT > flash - - .ARM.extab : { - *(.ARM.extab*) - } >sram1 - - .ARM.exidx : { - __exidx_start = ABSOLUTE(.); - *(.ARM.exidx*) - __exidx_end = ABSOLUTE(.); - } >sram1 - - .bss : { /* BSS */ - _sbss = ABSOLUTE(.); - *(.bss .bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - _ebss = ABSOLUTE(.); - } > sram1 - /* 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) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} diff --git a/configs/sam3u-ek/nx/ld.script b/configs/sam3u-ek/scripts/ld.script similarity index 97% rename from configs/sam3u-ek/nx/ld.script rename to configs/sam3u-ek/scripts/ld.script index 56ae5d6a4e..e382165836 100755 --- a/configs/sam3u-ek/nx/ld.script +++ b/configs/sam3u-ek/scripts/ld.script @@ -1,5 +1,5 @@ /**************************************************************************** - * configs/sam3u-ek/nx/ld.script + * configs/sam3u-ek/scripts/ld.script * * Copyright (C) 2010 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -33,7 +33,7 @@ * ****************************************************************************/ -/* The AT91SAM3U-4 has 256Kb of FLASH beginning at address 0x0008:0000, +/* The AT91SAM3U-4 has 256Kb of FLASH beginning at address 0x0008:0000, * 32Kb of SRAM beginning at address 0x2000:0000, and 16Kb of SRAM beginning * at address 0x2008:000 (used only for heap). When booting from FLASH, * FLASH memory is aliased to address 0x0000:0000 where the code expects to @@ -55,10 +55,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) diff --git a/configs/sam3u-ek/touchscreen/Make.defs b/configs/sam3u-ek/touchscreen/Make.defs index 99410a652c..fce80ec256 100644 --- a/configs/sam3u-ek/touchscreen/Make.defs +++ b/configs/sam3u-ek/touchscreen/Make.defs @@ -74,14 +74,14 @@ ifeq ($(WINTOOL),y) MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/touchscreen/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" MAXOPTIMIZATION = -O2 else # Linux/Cygwin-native toolchain MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/touchscreen/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script endif CC = $(CROSSDEV)gcc diff --git a/configs/sam3u-ek/touchscreen/ld.script b/configs/sam3u-ek/touchscreen/ld.script deleted file mode 100755 index dd30648a28..0000000000 --- a/configs/sam3u-ek/touchscreen/ld.script +++ /dev/null @@ -1,111 +0,0 @@ -/**************************************************************************** - * configs/sam3u-ek/touchscreen/ld.script - * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/* The AT91SAM3U-4 has 256Kb of FLASH beginning at address 0x0008:0000, - * 32Kb of SRAM beginning at address 0x2000:0000, and 16Kb of SRAM beginning - * at address 0x2008:000 (used only for heap). When booting from FLASH, - * FLASH memory is aliased to address 0x0000:0000 where the code expects to - * begin execution by jumping to the entry point in the 0x0800:0000 address - * range. - */ - -MEMORY -{ - flash (rx) : ORIGIN = 0x00080000, LENGTH = 256K - sram1 (rwx) : ORIGIN = 0x20000000, LENGTH = 32K - sram2 (rwx) : ORIGIN = 0x20080000, LENGTH = 16K -} - -OUTPUT_ARCH(arm) -ENTRY(_stext) -SECTIONS -{ - .text : { - _stext = ABSOLUTE(.); - *(.vectors) - *(.text .text.*) - *(.fixup) - *(.gnu.warning) - *(.rodata .rodata.*) - *(.gnu.linkonce.t.*) - *(.glue_7) - *(.glue_7t) - *(.got) - *(.gcc_except_table) - *(.gnu.linkonce.r.*) - _etext = ABSOLUTE(.); - } > flash - - _eronly = ABSOLUTE(.); /* See below */ - - .data : { - _sdata = ABSOLUTE(.); - *(.data .data.*) - *(.gnu.linkonce.d.*) - CONSTRUCTORS - _edata = ABSOLUTE(.); - } > sram1 AT > flash - - .ARM.extab : { - *(.ARM.extab*) - } >sram1 - - .ARM.exidx : { - __exidx_start = ABSOLUTE(.); - *(.ARM.exidx*) - __exidx_end = ABSOLUTE(.); - } >sram1 - - .bss : { /* BSS */ - _sbss = ABSOLUTE(.); - *(.bss .bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - _ebss = ABSOLUTE(.); - } > sram1 - /* 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) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} diff --git a/configs/shenzhou/scripts/ld.script b/configs/shenzhou/scripts/ld.script index d167cc49d7..1a23385f70 100644 --- a/configs/shenzhou/scripts/ld.script +++ b/configs/shenzhou/scripts/ld.script @@ -50,10 +50,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) @@ -69,15 +69,15 @@ SECTIONS _einit = ABSOLUTE(.); } > flash + .ARM.extab : { + *(.ARM.extab*) + } > flash + __exidx_start = ABSOLUTE(.); .ARM.exidx : { *(.ARM.exidx*) } > flash __exidx_end = ABSOLUTE(.); - - .ARM.extab : { - *(.ARM.extab*) - } > flash _eronly = ABSOLUTE(.); diff --git a/configs/shenzhou/scripts/ld.script.dfu b/configs/shenzhou/scripts/ld.script.dfu index c6d0d76b8e..dcf57b9b0b 100644 --- a/configs/shenzhou/scripts/ld.script.dfu +++ b/configs/shenzhou/scripts/ld.script.dfu @@ -52,10 +52,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) @@ -71,6 +71,10 @@ SECTIONS _einit = ABSOLUTE(.); } > flash + .ARM.extab : { + *(.ARM.extab*) + } > flash + __exidx_start = ABSOLUTE(.); .ARM.exidx : { *(.ARM.exidx*) @@ -89,10 +93,6 @@ SECTIONS _edata = ABSOLUTE(.); } > sram AT > flash - .ARM.extab : { - *(.ARM.extab*) - } >sram - .bss : { _sbss = ABSOLUTE(.); *(.bss .bss.*) diff --git a/configs/stm3210e-eval/RIDE/README.txt b/configs/stm3210e-eval/RIDE/README.txt index 8da1c38c98..b8f40e4004 100644 --- a/configs/stm3210e-eval/RIDE/README.txt +++ b/configs/stm3210e-eval/RIDE/README.txt @@ -1,38 +1,38 @@ -README ------- - -This directory contains a simple RIDE7 project used to bring up the -STM3210E-EVAL board. This project includes only the STM32 boot-up -code under arch/arm/src and configs/stm3210e-eval/src plus as little -additional environmental support as necessary. - -bigfatstub.c - - The NuttX OS is not included in this project. This file contains - stubs for all of the NuttX entry points and this replaces NuttX - -Make.defs, defconfig, setenv.h - - The first step to using this RIDE project is to build a compatible - cygwin project. This will set up of the directories and produce - all of the necessary autogenerated files. - - cd tools - ./configure.sh stm3210e-eva/RIDE - cd .. - . ./setenv.sh - make - -nuttx.* - - RIDE7 project files - -stm32-nuttx.ld - - This is the linker script that replaces the RIDE7 linker script. - -stm32-ld.sh - - This is a shell script that will use the RIDE7 tools to relink the - NuttX binaries. Useful because RIDE7 does not provide much linker - output to see what is going on. +README +------ + +This directory contains a simple RIDE7 project used to bring up the +STM3210E-EVAL board. This project includes only the STM32 boot-up +code under arch/arm/src and configs/stm3210e-eval/src plus as little +additional environmental support as necessary. + +bigfatstub.c + + The NuttX OS is not included in this project. This file contains + stubs for all of the NuttX entry points and this replaces NuttX + +Make.defs, defconfig, setenv.h + + The first step to using this RIDE project is to build a compatible + cygwin project. This will set up of the directories and produce + all of the necessary autogenerated files. + + cd tools + ./configure.sh stm3210e-eva/RIDE + cd .. + . ./setenv.sh + make + +nuttx.* + + RIDE7 project files + +../scripts/ld.scrip + + This is the linker script that replaces the RIDE7 linker script. + +stm32-ld.sh + + This is a shell script that will use the RIDE7 tools to relink the + NuttX binaries. Useful because RIDE7 does not provide much linker + output to see what is going on. diff --git a/configs/stm3210e-eval/RIDE/nuttx.elf.ld b/configs/stm3210e-eval/RIDE/nuttx.elf.ld index f4d3a6ca1c..515f91cc29 100755 --- a/configs/stm3210e-eval/RIDE/nuttx.elf.ld +++ b/configs/stm3210e-eval/RIDE/nuttx.elf.ld @@ -1,4 +1,4 @@ - + SEARCH_DIR(".") SEARCH_DIR("C:\Program Files\Raisonance\Ride\Lib\ARM") STARTUP("C:\cygwin\home\Owner\projects\nuttx\nuttx\arch\arm\src\stm32_vectors.o") @@ -16,4 +16,4 @@ INPUT("C:\cygwin\home\Owner\projects\nuttx\nuttx\configs\stm3210e-eval\RIDE\up_b INPUT("C:\cygwin\home\Owner\projects\nuttx\nuttx\configs\stm3210e-eval\RIDE\irq_unexpectedisr.o") INPUT("C:\cygwin\home\Owner\projects\nuttx\nuttx\configs\stm3210e-eval\RIDE\lib_memcpy.o") OUTPUT("C:\cygwin\home\Owner\projects\nuttx\nuttx\configs\stm3210e-eval\RIDE\nuttx.elf") -INCLUDE "C:\cygwin\home\Owner\projects\nuttx\nuttx\configs\stm3210e-eval\RIDE\stm32-nuttx.ld" +INCLUDE "C:\cygwin\home\Owner\projects\nuttx\nuttx\configs\stm3210e-eval\scripts\ld.script" diff --git a/configs/stm3210e-eval/RIDE/nuttx.rapp b/configs/stm3210e-eval/RIDE/nuttx.rapp index 4ab167792f..ce9ffc81e2 100755 --- a/configs/stm3210e-eval/RIDE/nuttx.rapp +++ b/configs/stm3210e-eval/RIDE/nuttx.rapp @@ -62,7 +62,7 @@
- +
diff --git a/configs/stm3210e-eval/RIDE/stm32-nuttx.ld b/configs/stm3210e-eval/RIDE/stm32-nuttx.ld deleted file mode 100755 index 704960ad9f..0000000000 --- a/configs/stm3210e-eval/RIDE/stm32-nuttx.ld +++ /dev/null @@ -1,111 +0,0 @@ -/**************************************************************************** - * configs/stm3210e-eval/RIDE/stm32-nuttx.ld - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/* The STM32F103ZET6 has 512Kb of FLASH beginning at address 0x0800:0000 and - * 64Kb of SRAM beginning at address 0x2000:0000. When booting from FLASH, - * FLASH memory is aliased to address 0x0000:0000 where the code expects to - * begin execution by jumping to the entry point in the 0x0800:0000 address - * range. - */ - -MEMORY -{ - flash (rx) : ORIGIN = 0x08000000, LENGTH = 512K - sram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K -} - -OUTPUT_ARCH(arm) -ENTRY(_stext) -SECTIONS -{ - .text : { - _stext = ABSOLUTE(.); - *(.vectors) - *(.text .text.*) - *(.fixup) - *(.gnu.warning) - *(.rodata .rodata.*) - *(.gnu.linkonce.t.*) - *(.glue_7) - *(.glue_7t) - *(.got) - *(.gcc_except_table) - *(.gnu.linkonce.r.*) - _etext = ABSOLUTE(.); - } > flash - - _eronly = ABSOLUTE(.); /* See below */ - - /* The STM32F103Z has 64Kb of SRAM beginning at the following address */ - - .data : { - _sdata = ABSOLUTE(.); - *(.data .data.*) - *(.gnu.linkonce.d.*) - CONSTRUCTORS - _edata = ABSOLUTE(.); - } > sram AT > flash - - .ARM.extab : { - *(.ARM.extab*) - } >sram - - .ARM.exidx : { - __exidx_start = ABSOLUTE(.); - *(.ARM.exidx*) - __exidx_end = ABSOLUTE(.); - } >sram - - .bss : { /* BSS */ - _sbss = ABSOLUTE(.); - *(.bss .bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - _ebss = ABSOLUTE(.); - } > sram - /* 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) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} diff --git a/configs/stm3210e-eval/scripts/ld.script b/configs/stm3210e-eval/scripts/ld.script index 5504f0f612..0f0e017aa8 100644 --- a/configs/stm3210e-eval/scripts/ld.script +++ b/configs/stm3210e-eval/scripts/ld.script @@ -53,10 +53,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) @@ -66,6 +66,22 @@ SECTIONS _etext = ABSOLUTE(.); } > flash + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > flash + + .ARM.extab : { + *(.ARM.extab*) + } > flash + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > flash + __exidx_end = ABSOLUTE(.); + _eronly = ABSOLUTE(.); /* The STM32F103Z has 64Kb of SRAM beginning at the following address */ @@ -78,16 +94,6 @@ SECTIONS _edata = ABSOLUTE(.); } > sram AT > flash - .ARM.extab : { - *(.ARM.extab*) - } >sram - - __exidx_start = ABSOLUTE(.); - .ARM.exidx : { - *(.ARM.exidx*) - } >sram - __exidx_end = ABSOLUTE(.); - .bss : { _sbss = ABSOLUTE(.); *(.bss .bss.*) diff --git a/configs/stm3210e-eval/scripts/ld.script.dfu b/configs/stm3210e-eval/scripts/ld.script.dfu index 8f879983a0..8669a0f021 100644 --- a/configs/stm3210e-eval/scripts/ld.script.dfu +++ b/configs/stm3210e-eval/scripts/ld.script.dfu @@ -52,10 +52,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) @@ -65,6 +65,22 @@ SECTIONS _etext = ABSOLUTE(.); } > flash + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > flash + + .ARM.extab : { + *(.ARM.extab*) + } > flash + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > flash + __exidx_end = ABSOLUTE(.); + _eronly = ABSOLUTE(.); /* The STM32F103Z has 64Kb of SRAM beginning at the following address */ @@ -77,16 +93,6 @@ SECTIONS _edata = ABSOLUTE(.); } > sram AT > flash - .ARM.extab : { - *(.ARM.extab*) - } >sram - - __exidx_start = ABSOLUTE(.); - .ARM.exidx : { - *(.ARM.exidx*) - } >sram - __exidx_end = ABSOLUTE(.); - .bss : { _sbss = ABSOLUTE(.); *(.bss .bss.*) diff --git a/configs/stm3220g-eval/scripts/ld.script b/configs/stm3220g-eval/scripts/ld.script index 1c9f12bba1..1b88091666 100644 --- a/configs/stm3220g-eval/scripts/ld.script +++ b/configs/stm3220g-eval/scripts/ld.script @@ -58,10 +58,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) @@ -77,6 +77,10 @@ SECTIONS _einit = ABSOLUTE(.); } > flash + .ARM.extab : { + *(.ARM.extab*) + } > flash + __exidx_start = ABSOLUTE(.); .ARM.exidx : { *(.ARM.exidx*) @@ -93,10 +97,6 @@ SECTIONS _edata = ABSOLUTE(.); } > sram AT > flash - .ARM.extab : { - *(.ARM.extab*) - } >sram - .bss : { _sbss = ABSOLUTE(.); *(.bss .bss.*) diff --git a/configs/stm3240g-eval/scripts/ld.script b/configs/stm3240g-eval/scripts/ld.script index 078f2890f4..e319a896a9 100644 --- a/configs/stm3240g-eval/scripts/ld.script +++ b/configs/stm3240g-eval/scripts/ld.script @@ -59,10 +59,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) @@ -78,6 +78,10 @@ SECTIONS _einit = ABSOLUTE(.); } > flash + .ARM.extab : { + *(.ARM.extab*) + } > flash + __exidx_start = ABSOLUTE(.); .ARM.exidx : { *(.ARM.exidx*) @@ -94,10 +98,6 @@ SECTIONS _edata = ABSOLUTE(.); } > sram AT > flash - .ARM.extab : { - *(.ARM.extab*) - } >sram - .bss : { _sbss = ABSOLUTE(.); *(.bss .bss.*) diff --git a/configs/stm32f4discovery/scripts/ld.script b/configs/stm32f4discovery/scripts/ld.script index 67879e8d1d..edc4a70910 100644 --- a/configs/stm32f4discovery/scripts/ld.script +++ b/configs/stm32f4discovery/scripts/ld.script @@ -59,10 +59,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) @@ -78,6 +78,10 @@ SECTIONS _einit = ABSOLUTE(.); } > flash + .ARM.extab : { + *(.ARM.extab*) + } > flash + __exidx_start = ABSOLUTE(.); .ARM.exidx : { *(.ARM.exidx*) @@ -94,10 +98,6 @@ SECTIONS _edata = ABSOLUTE(.); } > sram AT > flash - .ARM.extab : { - *(.ARM.extab*) - } >sram - .bss : { _sbss = ABSOLUTE(.); *(.bss .bss.*) diff --git a/configs/sure-pic32mx/nsh/ld.script b/configs/sure-pic32mx/nsh/ld.script index a88bdc2c8f..0975477cce 100644 --- a/configs/sure-pic32mx/nsh/ld.script +++ b/configs/sure-pic32mx/nsh/ld.script @@ -39,7 +39,7 @@ MEMORY /* The PIC32MX440F512H has 512Kb of program FLASH at physical address * 0x1d000000 but is always accessed at KSEG0 address 0x9d00:0000 */ - + kseg0_progmem (rx) : ORIGIN = 0x9d000000, LENGTH = 512K /* The PIC32MX440F512H has 12Kb of boot FLASH at physical address @@ -168,8 +168,8 @@ SECTIONS .text : { _stext = ABSOLUTE(.); - *(.text .text.*) - *(.stub) + *(.text .text.*) + *(.stub) KEEP (*(.text.*personality*)) *(.gnu.linkonce.t.*) *(.gnu.warning) @@ -178,12 +178,12 @@ SECTIONS /* Read-only data is included in the text section */ - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.rodata1) *(.gnu.linkonce.r.*) /* Small initialized constant global and static data */ - + *(.sdata2 .sdata2.*) *(.gnu.linkonce.s2.*) diff --git a/configs/sure-pic32mx/ostest/ld.script b/configs/sure-pic32mx/ostest/ld.script index 7b5ffa3c4a..01d97ad552 100644 --- a/configs/sure-pic32mx/ostest/ld.script +++ b/configs/sure-pic32mx/ostest/ld.script @@ -39,7 +39,7 @@ MEMORY /* The PIC32MX440F512H has 512Kb of program FLASH at physical address * 0x1d000000 but is always accessed at KSEG0 address 0x9d00:0000 */ - + kseg0_progmem (rx) : ORIGIN = 0x9d000000, LENGTH = 512K /* The PIC32MX440F512H has 12Kb of boot FLASH at physical address @@ -168,8 +168,8 @@ SECTIONS .text : { _stext = ABSOLUTE(.); - *(.text .text.*) - *(.stub) + *(.text .text.*) + *(.stub) KEEP (*(.text.*personality*)) *(.gnu.linkonce.t.*) *(.gnu.warning) @@ -178,12 +178,12 @@ SECTIONS /* Read-only data is included in the text section */ - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.rodata1) *(.gnu.linkonce.r.*) /* Small initialized constant global and static data */ - + *(.sdata2 .sdata2.*) *(.gnu.linkonce.s2.*) diff --git a/configs/sure-pic32mx/usbnsh/ld.script b/configs/sure-pic32mx/usbnsh/ld.script index 5bdc5af6f6..088f812d8d 100644 --- a/configs/sure-pic32mx/usbnsh/ld.script +++ b/configs/sure-pic32mx/usbnsh/ld.script @@ -39,7 +39,7 @@ MEMORY /* The PIC32MX440F512H has 512Kb of program FLASH at physical address * 0x1d000000 but is always accessed at KSEG0 address 0x9d00:0000 */ - + kseg0_progmem (rx) : ORIGIN = 0x9d000000, LENGTH = 512K /* The PIC32MX440F512H has 12Kb of boot FLASH at physical address @@ -168,8 +168,8 @@ SECTIONS .text : { _stext = ABSOLUTE(.); - *(.text .text.*) - *(.stub) + *(.text .text.*) + *(.stub) KEEP (*(.text.*personality*)) *(.gnu.linkonce.t.*) *(.gnu.warning) @@ -178,12 +178,12 @@ SECTIONS /* Read-only data is included in the text section */ - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.rodata1) *(.gnu.linkonce.r.*) /* Small initialized constant global and static data */ - + *(.sdata2 .sdata2.*) *(.gnu.linkonce.s2.*) diff --git a/configs/twr-k60n512/nsh/Make.defs b/configs/twr-k60n512/nsh/Make.defs index f2922c575b..a558cc0109 100644 --- a/configs/twr-k60n512/nsh/Make.defs +++ b/configs/twr-k60n512/nsh/Make.defs @@ -74,14 +74,14 @@ ifeq ($(WINTOOL),y) MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" MAXOPTIMIZATION = -O2 else # Linux/Cygwin-native toolchain MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script endif CC = $(CROSSDEV)gcc diff --git a/configs/twr-k60n512/ostest/Make.defs b/configs/twr-k60n512/ostest/Make.defs index 871141640d..6d49455215 100644 --- a/configs/twr-k60n512/ostest/Make.defs +++ b/configs/twr-k60n512/ostest/Make.defs @@ -74,14 +74,14 @@ ifeq ($(WINTOOL),y) MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}" MAXOPTIMIZATION = -O2 else # Linux/Cygwin-native toolchain MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script endif CC = $(CROSSDEV)gcc diff --git a/configs/twr-k60n512/ostest/ld.script b/configs/twr-k60n512/ostest/ld.script deleted file mode 100644 index 717a457474..0000000000 --- a/configs/twr-k60n512/ostest/ld.script +++ /dev/null @@ -1,135 +0,0 @@ -/**************************************************************************** - * configs/twr-k60n512/ostest/ld.script - * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/* The K60N512VMD100 has 512Kb of FLASH beginning at address 0x0000:0000 and - * 128Kb of SRAM beginning at address 0x1800:0000 (SRAM_L) and 0x2000:000 - * (SRAM_U). - * - * NOTE: that the first part of the K40 FLASH region is reserved for - * interrupt vectflash and, following that, is a region from 0x0000:0400 - * to 0x0000:040f that is reserved for the FLASH control fields (FCF). - * - * NOTE: The on-chip RAM is split evenly among SRAM_L and SRAM_U. The RAM is - * also implemented such that the SRAM_L and SRAM_U ranges form a - * contiguous block in the memory map. - */ - -MEMORY -{ - vectflash (rx) : ORIGIN = 0x00000000, LENGTH = 1K - 16 - cfmprotect (rx) : ORIGIN = 0x00000400, LENGTH = 16 - progflash (rx) : ORIGIN = 0x00000800, LENGTH = 512K - 2K - datasram (rwx) : ORIGIN = 0x1fff0000, LENGTH = 128K -} - -OUTPUT_ARCH(arm) -ENTRY(_stext) -SECTIONS -{ - .vectors : { - _svectors = ABSOLUTE(.); - *(.vectors) - _evectors = ABSOLUTE(.); - } > vectflash - - .cfmprotect : { - *(.cfmconfig) - } > cfmprotect - - .text : { - _stext = ABSOLUTE(.); - *(.text .text.*) - *(.fixup) - *(.gnu.warning) - *(.rodata .rodata.*) - *(.gnu.linkonce.t.*) - *(.glue_7) - *(.glue_7t) - *(.got) - *(.gcc_except_table) - *(.gnu.linkonce.r.*) - _etext = ABSOLUTE(.); - } > progflash - - .data : { - _sdata = ABSOLUTE(.); - *(.data .data.*) - *(.gnu.linkonce.d.*) - CONSTRUCTORS - _edata = ABSOLUTE(.); - } > datasram AT > progflash - - _eronly = LOADADDR(.data); - - .ramfunc ALIGN(4): { - _sramfuncs = ABSOLUTE(.); - *(.ramfunc .ramfunc.*) - _eramfuncs = ABSOLUTE(.); - } > datasram AT > progflash - - _framfuncs = LOADADDR(.ramfunc); - - .ARM.extab : { - *(.ARM.extab*) - } > datasram - - __exidx_start = ABSOLUTE(.); - .ARM.exidx : { - *(.ARM.exidx*) - } > datasram - __exidx_end = ABSOLUTE(.); - - .bss : { - _sbss = ABSOLUTE(.); - *(.bss .bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - _ebss = ABSOLUTE(.); - } > datasram - - /* 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) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} diff --git a/configs/twr-k60n512/nsh/ld.script b/configs/twr-k60n512/scripts/ld.script similarity index 92% rename from configs/twr-k60n512/nsh/ld.script rename to configs/twr-k60n512/scripts/ld.script index e8e5e7de15..26410e6d86 100644 --- a/configs/twr-k60n512/nsh/ld.script +++ b/configs/twr-k60n512/scripts/ld.script @@ -1,5 +1,5 @@ -/**************************************************************************** - * configs/twr-k60n512/nsh/ld.script + /**************************************************************************** + * configs/twr-k60n512/scripts/ld.script * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -70,10 +70,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) @@ -83,6 +83,22 @@ SECTIONS _etext = ABSOLUTE(.); } > progflash + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > progflash + + .ARM.extab : { + *(.ARM.extab*) + } > progflash + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > progflash + __exidx_end = ABSOLUTE(.); + .data : { _sdata = ABSOLUTE(.); *(.data .data.*) @@ -101,16 +117,6 @@ SECTIONS _framfuncs = LOADADDR(.ramfunc); - .ARM.extab : { - *(.ARM.extab*) - } > datasram - - __exidx_start = ABSOLUTE(.); - .ARM.exidx : { - *(.ARM.exidx*) - } > datasram - __exidx_end = ABSOLUTE(.); - .bss : { _sbss = ABSOLUTE(.); *(.bss .bss.*) diff --git a/configs/ubw32/nsh/ld.script b/configs/ubw32/nsh/ld.script index b053aebe62..43e64a51be 100644 --- a/configs/ubw32/nsh/ld.script +++ b/configs/ubw32/nsh/ld.script @@ -39,7 +39,7 @@ MEMORY /* The PIC32MX460F512L has 512Kb of program FLASH at physical address * 0x1d000000 but is always accessed at KSEG0 address 0x9d00:0000 */ - + kseg0_progmem (rx) : ORIGIN = 0x9d000000, LENGTH = 512K /* The PIC32MX460F512L has 12Kb of boot FLASH at physical address @@ -168,8 +168,8 @@ SECTIONS .text : { _stext = ABSOLUTE(.); - *(.text .text.*) - *(.stub) + *(.text .text.*) + *(.stub) KEEP (*(.text.*personality*)) *(.gnu.linkonce.t.*) *(.gnu.warning) @@ -178,12 +178,12 @@ SECTIONS /* Read-only data is included in the text section */ - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.rodata1) *(.gnu.linkonce.r.*) /* Small initialized constant global and static data */ - + *(.sdata2 .sdata2.*) *(.gnu.linkonce.s2.*) diff --git a/configs/ubw32/ostest/ld.script b/configs/ubw32/ostest/ld.script index ff4d1c79f2..3a64fff23a 100644 --- a/configs/ubw32/ostest/ld.script +++ b/configs/ubw32/ostest/ld.script @@ -39,7 +39,7 @@ MEMORY /* The PIC32MX460F512L has 512Kb of program FLASH at physical address * 0x1d000000 but is always accessed at KSEG0 address 0x9d00:0000 */ - + kseg0_progmem (rx) : ORIGIN = 0x9d000000, LENGTH = 512K /* The PIC32MX460F512L has 12Kb of boot FLASH at physical address @@ -168,8 +168,8 @@ SECTIONS .text : { _stext = ABSOLUTE(.); - *(.text .text.*) - *(.stub) + *(.text .text.*) + *(.stub) KEEP (*(.text.*personality*)) *(.gnu.linkonce.t.*) *(.gnu.warning) @@ -178,12 +178,12 @@ SECTIONS /* Read-only data is included in the text section */ - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.rodata1) *(.gnu.linkonce.r.*) /* Small initialized constant global and static data */ - + *(.sdata2 .sdata2.*) *(.gnu.linkonce.s2.*) diff --git a/configs/vsn/nsh/Make.defs b/configs/vsn/nsh/Make.defs index 64b972ee27..c6ab376dec 100644 --- a/configs/vsn/nsh/Make.defs +++ b/configs/vsn/nsh/Make.defs @@ -86,14 +86,14 @@ ifeq ($(WINTOOL),y) MKDEP = $(TOPDIR)/tools/mknulldeps.sh ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" - ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh/$(LDSCRIPT)}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}" MAXOPTIMIZATION = -O2 else # Linux/Cygwin-native toolchain MKDEP = $(TOPDIR)/tools/mkdeps.sh ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx - ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nsh/$(LDSCRIPT) + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT) endif CC = $(CROSSDEV)gcc diff --git a/configs/vsn/nsh/ld.script b/configs/vsn/nsh/ld.script index 63c8585ebf..1ee155fb59 100755 --- a/configs/vsn/nsh/ld.script +++ b/configs/vsn/nsh/ld.script @@ -1,5 +1,5 @@ /**************************************************************************** - * configs/stm3210e-eval/nsh/ld.script + * configs/stm3210e-eval/scripts/ld.script * * Copyright (C) 2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -53,10 +53,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) @@ -66,7 +66,23 @@ SECTIONS _etext = ABSOLUTE(.); } > flash - _eronly = ABSOLUTE(.); /* See below */ + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > flash + + .ARM.extab : { + *(.ARM.extab*) + } > flash + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > flash + __exidx_end = ABSOLUTE(.); + + _eronly = ABSOLUTE(.); /* The STM32F103Z has 64Kb of SRAM beginning at the following address */ @@ -78,16 +94,6 @@ SECTIONS _edata = ABSOLUTE(.); } > sram AT > flash - .ARM.extab : { - *(.ARM.extab*) - } >sram - - .ARM.exidx : { - __exidx_start = ABSOLUTE(.); - *(.ARM.exidx*) - __exidx_end = ABSOLUTE(.); - } >sram - .bss : { /* BSS */ _sbss = ABSOLUTE(.); *(.bss .bss.*) diff --git a/configs/vsn/nsh/ld.script.dfu b/configs/vsn/nsh/ld.script.dfu index aa077ba3b7..3f5e2a06a6 100755 --- a/configs/vsn/nsh/ld.script.dfu +++ b/configs/vsn/nsh/ld.script.dfu @@ -1,5 +1,5 @@ /**************************************************************************** - * configs/stm3210e-eval/nsh/ld.script.dfu + * configs/stm3210e-eval/scripts/ld.script.dfu * * Copyright (C) 2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -52,10 +52,10 @@ SECTIONS .text : { _stext = ABSOLUTE(.); *(.vectors) - *(.text .text.*) + *(.text .text.*) *(.fixup) *(.gnu.warning) - *(.rodata .rodata.*) + *(.rodata .rodata.*) *(.gnu.linkonce.t.*) *(.glue_7) *(.glue_7t) @@ -65,7 +65,23 @@ SECTIONS _etext = ABSOLUTE(.); } > flash - _eronly = ABSOLUTE(.); /* See below */ + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > flash + + .ARM.extab : { + *(.ARM.extab*) + } > flash + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > flash + __exidx_end = ABSOLUTE(.); + + _eronly = ABSOLUTE(.); /* The STM32F103Z has 64Kb of SRAM beginning at the following address */ @@ -77,16 +93,6 @@ SECTIONS _edata = ABSOLUTE(.); } > sram AT > flash - .ARM.extab : { - *(.ARM.extab*) - } >sram - - .ARM.exidx : { - __exidx_start = ABSOLUTE(.); - *(.ARM.exidx*) - __exidx_end = ABSOLUTE(.); - } >sram - .bss : { /* BSS */ _sbss = ABSOLUTE(.); *(.bss .bss.*)