aboutsummaryrefslogtreecommitdiffstats
path: root/support/ld/common_header.inc
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2011-09-13 03:23:03 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2011-09-13 04:44:02 -0400
commit514cc1c190300af2bdfd94a0ae1a37d416d3c125 (patch)
treeff94c10660658c4f7884d11d73683df2920a7fae /support/ld/common_header.inc
parentaf9c6c9f7143067fb48f5bb3eb1474003dcb5017 (diff)
downloadlibrambutan-514cc1c190300af2bdfd94a0ae1a37d416d3c125.tar.gz
librambutan-514cc1c190300af2bdfd94a0ae1a37d416d3c125.zip
[support/ld] Unify linker scripts.
Add new common.inc, which is common_rom.inc with some DEFINED(_FLASH_BUILD) usages thrown in to allow for RAM builds. It also uses a new REGION_RODATA region alias for read-only data. Move section .USER_FLASH to REGION_RODATA. This means it lives in RAM under RAM builds. Although this might be surprising, not doing so would make RAM builds useless. Modify the individual board linker scripts to properly set REGION_RODATA and _FLASH_BUILD before calling out to common.inc. Delete common_rom.inc, common_ram.inc, common_header.inc, in favor of common.inc. This should fix RAM builds on all boards.
Diffstat (limited to 'support/ld/common_header.inc')
-rw-r--r--support/ld/common_header.inc37
1 files changed, 0 insertions, 37 deletions
diff --git a/support/ld/common_header.inc b/support/ld/common_header.inc
deleted file mode 100644
index 1d11ba0..0000000
--- a/support/ld/common_header.inc
+++ /dev/null
@@ -1,37 +0,0 @@
-/* "Preamble" for linker scripts (such as common_rom.inc) */
-
-OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
-ENTRY(_start)
-SEARCH_DIR(.)
-
-/*
- * Link against libgcc, libc, and libm
- */
-GROUP(libgcc.a libc.a libm.a)
-
-/* These force the linker to search for particular symbols from
- * the start of the link process and thus ensure the user's
- * overrides are picked up
- */
-INCLUDE names.inc
-
-/* STM32 vector table. See stm32_vector_table.S */
-EXTERN(__cs3_stm32_vector_table)
-
-/* libcs3 C start function. See cs3.h */
-EXTERN(__cs3_start_c)
-
-/* main entry point */
-EXTERN(main)
-
-/* Initial stack pointer value. */
-EXTERN(__cs3_stack)
-PROVIDE(__cs3_stack = __cs3_region_start_ram + LENGTH(ram));
-
-/* Reset vector and chip reset entry point. See start.S */
-EXTERN(_start)
-PROVIDE(__cs3_reset = _start);
-
-/* Heap boundaries, for libmaple */
-EXTERN(_lm_heap_start);
-EXTERN(_lm_heap_end);