forked from Imagelibrary/rtems
2010-12-03 Sebastian Huber <sebastian.huber@embedded-brains.de>
* preinstall.am, shared/lpc/include/lpc-i2s.h, shared/startup/linkcmds.armv4, shared/startup/linkcmds.armv7: New files. * Makefile.am: Added header and linker command files intended to be used by every ARM BSP. * shared/startup/linkcmds.base: Support for EABI and ARM ELF standard. * shared/include/linker-symbols.h: Update due to linker command file changes. * shared/start/start.S, shared/include/start.h: Renamed entry symbol from start to _start to avoid namespace conflicts. Update due to linker command file changes.
This commit is contained in:
@@ -1,3 +1,17 @@
|
|||||||
|
2010-12-03 Sebastian Huber <sebastian.huber@embedded-brains.de>
|
||||||
|
|
||||||
|
* preinstall.am, shared/lpc/include/lpc-i2s.h,
|
||||||
|
shared/startup/linkcmds.armv4, shared/startup/linkcmds.armv7: New
|
||||||
|
files.
|
||||||
|
* Makefile.am: Added header and linker command files intended to be
|
||||||
|
used by every ARM BSP.
|
||||||
|
* shared/startup/linkcmds.base: Support for EABI and ARM ELF standard.
|
||||||
|
* shared/include/linker-symbols.h: Update due to linker command file
|
||||||
|
changes.
|
||||||
|
* shared/start/start.S, shared/include/start.h: Renamed entry symbol
|
||||||
|
from start to _start to avoid namespace conflicts. Update due to
|
||||||
|
linker command file changes.
|
||||||
|
|
||||||
2010-11-23 Gedare Bloom <giddyup44@yahoo.com>
|
2010-11-23 Gedare Bloom <giddyup44@yahoo.com>
|
||||||
|
|
||||||
PR 1719/cpukit
|
PR 1719/cpukit
|
||||||
|
|||||||
@@ -9,6 +9,13 @@ ACLOCAL_AMFLAGS = -I ../../../aclocal
|
|||||||
## added but it is present in the source tree.
|
## added but it is present in the source tree.
|
||||||
SUBDIRS = @RTEMS_BSP_FAMILY@
|
SUBDIRS = @RTEMS_BSP_FAMILY@
|
||||||
|
|
||||||
|
include_bspdir = $(includedir)/bsp
|
||||||
|
include_bsp_HEADERS = shared/include/linker-symbols.h
|
||||||
|
|
||||||
|
dist_project_lib_DATA = shared/startup/linkcmds.base
|
||||||
|
dist_project_lib_DATA += shared/startup/linkcmds.armv4
|
||||||
|
dist_project_lib_DATA += shared/startup/linkcmds.armv7
|
||||||
|
|
||||||
EXTRA_DIST =
|
EXTRA_DIST =
|
||||||
|
|
||||||
# comm
|
# comm
|
||||||
@@ -18,5 +25,6 @@ EXTRA_DIST += shared/comm/uart.c
|
|||||||
# abort
|
# abort
|
||||||
EXTRA_DIST += shared/abort/simple_abort.c
|
EXTRA_DIST += shared/abort/simple_abort.c
|
||||||
|
|
||||||
|
include $(srcdir)/preinstall.am
|
||||||
include $(top_srcdir)/../../../automake/subdirs.am
|
include $(top_srcdir)/../../../automake/subdirs.am
|
||||||
include $(top_srcdir)/../../../automake/local.am
|
include $(top_srcdir)/../../../automake/local.am
|
||||||
|
|||||||
41
c/src/lib/libbsp/arm/preinstall.am
Normal file
41
c/src/lib/libbsp/arm/preinstall.am
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
## Automatically generated by ampolish3 - Do not edit
|
||||||
|
|
||||||
|
if AMPOLISH3
|
||||||
|
$(srcdir)/preinstall.am: Makefile.am
|
||||||
|
$(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am
|
||||||
|
endif
|
||||||
|
|
||||||
|
PREINSTALL_DIRS =
|
||||||
|
DISTCLEANFILES = $(PREINSTALL_DIRS)
|
||||||
|
|
||||||
|
all-am: $(PREINSTALL_FILES)
|
||||||
|
|
||||||
|
PREINSTALL_FILES =
|
||||||
|
CLEANFILES = $(PREINSTALL_FILES)
|
||||||
|
|
||||||
|
$(PROJECT_LIB)/$(dirstamp):
|
||||||
|
@$(MKDIR_P) $(PROJECT_LIB)
|
||||||
|
@: > $(PROJECT_LIB)/$(dirstamp)
|
||||||
|
PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp)
|
||||||
|
|
||||||
|
$(PROJECT_INCLUDE)/bsp/$(dirstamp):
|
||||||
|
@$(MKDIR_P) $(PROJECT_INCLUDE)/bsp
|
||||||
|
@: > $(PROJECT_INCLUDE)/bsp/$(dirstamp)
|
||||||
|
PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/$(dirstamp)
|
||||||
|
|
||||||
|
$(PROJECT_INCLUDE)/bsp/linker-symbols.h: shared/include/linker-symbols.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
|
||||||
|
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/linker-symbols.h
|
||||||
|
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/linker-symbols.h
|
||||||
|
|
||||||
|
$(PROJECT_LIB)/linkcmds.base: shared/startup/linkcmds.base $(PROJECT_LIB)/$(dirstamp)
|
||||||
|
$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.base
|
||||||
|
PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.base
|
||||||
|
|
||||||
|
$(PROJECT_LIB)/linkcmds.armv4: shared/startup/linkcmds.armv4 $(PROJECT_LIB)/$(dirstamp)
|
||||||
|
$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.armv4
|
||||||
|
PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.armv4
|
||||||
|
|
||||||
|
$(PROJECT_LIB)/linkcmds.armv7: shared/startup/linkcmds.armv7 $(PROJECT_LIB)/$(dirstamp)
|
||||||
|
$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.armv7
|
||||||
|
PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.armv7
|
||||||
|
|
||||||
@@ -74,21 +74,31 @@ LINKER_SYMBOL(bsp_section_text_begin)
|
|||||||
LINKER_SYMBOL(bsp_section_text_end)
|
LINKER_SYMBOL(bsp_section_text_end)
|
||||||
LINKER_SYMBOL(bsp_section_text_size)
|
LINKER_SYMBOL(bsp_section_text_size)
|
||||||
LINKER_SYMBOL(bsp_section_text_load_begin)
|
LINKER_SYMBOL(bsp_section_text_load_begin)
|
||||||
|
LINKER_SYMBOL(bsp_section_text_load_end)
|
||||||
|
|
||||||
LINKER_SYMBOL(bsp_section_rodata_begin)
|
LINKER_SYMBOL(bsp_section_rodata_begin)
|
||||||
LINKER_SYMBOL(bsp_section_rodata_end)
|
LINKER_SYMBOL(bsp_section_rodata_end)
|
||||||
LINKER_SYMBOL(bsp_section_rodata_size)
|
LINKER_SYMBOL(bsp_section_rodata_size)
|
||||||
LINKER_SYMBOL(bsp_section_rodata_load_begin)
|
LINKER_SYMBOL(bsp_section_rodata_load_begin)
|
||||||
|
LINKER_SYMBOL(bsp_section_rodata_load_end)
|
||||||
|
|
||||||
LINKER_SYMBOL(bsp_section_data_begin)
|
LINKER_SYMBOL(bsp_section_data_begin)
|
||||||
LINKER_SYMBOL(bsp_section_data_end)
|
LINKER_SYMBOL(bsp_section_data_end)
|
||||||
LINKER_SYMBOL(bsp_section_data_size)
|
LINKER_SYMBOL(bsp_section_data_size)
|
||||||
LINKER_SYMBOL(bsp_section_data_load_begin)
|
LINKER_SYMBOL(bsp_section_data_load_begin)
|
||||||
|
LINKER_SYMBOL(bsp_section_data_load_end)
|
||||||
|
|
||||||
LINKER_SYMBOL(bsp_section_fast_begin)
|
LINKER_SYMBOL(bsp_section_fast_text_begin)
|
||||||
LINKER_SYMBOL(bsp_section_fast_end)
|
LINKER_SYMBOL(bsp_section_fast_text_end)
|
||||||
LINKER_SYMBOL(bsp_section_fast_size)
|
LINKER_SYMBOL(bsp_section_fast_text_size)
|
||||||
LINKER_SYMBOL(bsp_section_fast_load_begin)
|
LINKER_SYMBOL(bsp_section_fast_text_load_begin)
|
||||||
|
LINKER_SYMBOL(bsp_section_fast_text_load_end)
|
||||||
|
|
||||||
|
LINKER_SYMBOL(bsp_section_fast_data_begin)
|
||||||
|
LINKER_SYMBOL(bsp_section_fast_data_end)
|
||||||
|
LINKER_SYMBOL(bsp_section_fast_data_size)
|
||||||
|
LINKER_SYMBOL(bsp_section_fast_data_load_begin)
|
||||||
|
LINKER_SYMBOL(bsp_section_fast_data_load_end)
|
||||||
|
|
||||||
LINKER_SYMBOL(bsp_section_bss_begin)
|
LINKER_SYMBOL(bsp_section_bss_begin)
|
||||||
LINKER_SYMBOL(bsp_section_bss_end)
|
LINKER_SYMBOL(bsp_section_bss_end)
|
||||||
@@ -106,6 +116,10 @@ LINKER_SYMBOL(bsp_vector_table_begin)
|
|||||||
LINKER_SYMBOL(bsp_vector_table_end)
|
LINKER_SYMBOL(bsp_vector_table_end)
|
||||||
LINKER_SYMBOL(bsp_vector_table_size)
|
LINKER_SYMBOL(bsp_vector_table_size)
|
||||||
|
|
||||||
|
#define BSP_FAST_TEXT_SECTION __attribute__((section(".bsp_fast_text")))
|
||||||
|
|
||||||
|
#define BSP_FAST_DATA_SECTION __attribute__((section(".bsp_fast_data")))
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
@@ -38,14 +38,14 @@ extern "C" {
|
|||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define BSP_START_SECTION __attribute__((section(".bsp_start")))
|
#define BSP_START_TEXT_SECTION __attribute__((section(".bsp_start_text")))
|
||||||
|
|
||||||
#define BSP_START_DATA_SECTION __attribute__((section(".bsp_start_data")))
|
#define BSP_START_DATA_SECTION __attribute__((section(".bsp_start_data")))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief System start entry.
|
* @brief System start entry.
|
||||||
*/
|
*/
|
||||||
void start(void);
|
void _start(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Start entry hook 0.
|
* @brief Start entry hook 0.
|
||||||
|
|||||||
131
c/src/lib/libbsp/arm/shared/lpc/include/lpc-i2s.h
Normal file
131
c/src/lib/libbsp/arm/shared/lpc/include/lpc-i2s.h
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
*
|
||||||
|
* @ingroup lpc_i2s
|
||||||
|
*
|
||||||
|
* @brief I2S API.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2010 embedded brains GmbH. All rights reserved.
|
||||||
|
*
|
||||||
|
* embedded brains GmbH
|
||||||
|
* Obere Lagerstr. 30
|
||||||
|
* 82178 Puchheim
|
||||||
|
* Germany
|
||||||
|
* <rtems@embedded-brains.de>
|
||||||
|
*
|
||||||
|
* The license and distribution terms for this file may be
|
||||||
|
* found in the file LICENSE in this distribution or at
|
||||||
|
* http://www.rtems.com/license/LICENSE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef LIBBSP_ARM_SHARED_LPC_I2S_H
|
||||||
|
#define LIBBSP_ARM_SHARED_LPC_I2S_H
|
||||||
|
|
||||||
|
#include <bsp/utility.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @defgroup lpc_dma I2S Support
|
||||||
|
*
|
||||||
|
* @ingroup lpc
|
||||||
|
*
|
||||||
|
* @brief I2S support.
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief I2S control block.
|
||||||
|
*/
|
||||||
|
typedef struct {
|
||||||
|
uint32_t dao;
|
||||||
|
uint32_t dai;
|
||||||
|
uint32_t txfifo;
|
||||||
|
uint32_t rxfifo;
|
||||||
|
uint32_t state;
|
||||||
|
uint32_t dma [2];
|
||||||
|
uint32_t irq;
|
||||||
|
uint32_t txrate;
|
||||||
|
uint32_t rxrate;
|
||||||
|
} lpc_i2s;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name I2S Digital Audio Input and Output
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define I2S_DAIO_WORDWIDTH(val) BSP_FLD32(val, 0, 1)
|
||||||
|
#define I2S_DAIO_MONO BSP_BIT32(2)
|
||||||
|
#define I2S_DAIO_STOP BSP_BIT32(3)
|
||||||
|
#define I2S_DAIO_RESET BSP_BIT32(4)
|
||||||
|
#define I2S_DAIO_WS_SEL BSP_BIT32(5)
|
||||||
|
#define I2S_DAIO_WS_HALFPERIOD(val) BSP_FLD32(val, 6, 14)
|
||||||
|
#define I2S_DAIO_MUTE BSP_BIT32(15)
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name I2S Status Feedback
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define I2S_STATE_IRQ BSP_BIT32(0)
|
||||||
|
#define I2S_STATE_DMAREQ_0 BSP_BIT32(1)
|
||||||
|
#define I2S_STATE_DMAREQ_1 BSP_BIT32(2)
|
||||||
|
#define I2S_STATE_RX_LEVEL_GET(reg) BSP_FLD32GET(reg, 8, 11)
|
||||||
|
#define I2S_STATE_TX_LEVEL_GET(reg) BSP_FLD32GET(reg, 16, 19)
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name I2S DMA Configuration
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define I2S_DMA_RX_ENABLE BSP_BIT32(0)
|
||||||
|
#define I2S_DMA_TX_ENABLE BSP_BIT32(1)
|
||||||
|
#define I2S_DMA_RX_DEPTH(val) BSP_FLD32(val, 8, 11)
|
||||||
|
#define I2S_DMA_TX_DEPTH(val) BSP_FLD32(val, 16, 19)
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name I2S Interrupt Request Control
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define I2S_IRQ_RX BSP_BIT32(0)
|
||||||
|
#define I2S_IRQ_TX BSP_BIT32(1)
|
||||||
|
#define I2S_IRQ_RX_DEPTH(val) BSP_FLD32(val, 8, 11)
|
||||||
|
#define I2S_IRQ_TX_DEPTH(val) BSP_FLD32(val, 16, 19)
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name I2S Transmit and Receive Clock Rate
|
||||||
|
*
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define LPC24XX_I2S_RATE(val) BSP_FLD32(val, 0, 9)
|
||||||
|
#define LPC32XX_I2S_RATE_X_DIVIDER BSP_FLD32(val, 0, 7)
|
||||||
|
#define LPC32XX_I2S_RATE_Y_DIVIDER BSP_FLD32(val, 8, 15)
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
#endif /* LIBBSP_ARM_SHARED_LPC_I2S_H */
|
||||||
@@ -32,10 +32,10 @@
|
|||||||
|
|
||||||
/* Global symbols */
|
/* Global symbols */
|
||||||
|
|
||||||
.globl start
|
.globl _start
|
||||||
.globl bsp_start_memcpy
|
.globl bsp_start_memcpy
|
||||||
|
|
||||||
.section ".bsp_start", "ax"
|
.section ".bsp_start_text", "ax"
|
||||||
|
|
||||||
.arm
|
.arm
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@ handler_addr_reset:
|
|||||||
#ifdef BSP_START_RESET_VECTOR
|
#ifdef BSP_START_RESET_VECTOR
|
||||||
.word BSP_START_RESET_VECTOR
|
.word BSP_START_RESET_VECTOR
|
||||||
#else
|
#else
|
||||||
.word start
|
.word _start
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
handler_addr_undef:
|
handler_addr_undef:
|
||||||
@@ -96,7 +96,7 @@ handler_addr_fiq:
|
|||||||
|
|
||||||
/* Start entry */
|
/* Start entry */
|
||||||
|
|
||||||
start:
|
_start:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We do not save the context since we do not return to the boot
|
* We do not save the context since we do not return to the boot
|
||||||
|
|||||||
38
c/src/lib/libbsp/arm/shared/startup/linkcmds.armv4
Normal file
38
c/src/lib/libbsp/arm/shared/startup/linkcmds.armv4
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
*
|
||||||
|
* @ingroup bsp_linker
|
||||||
|
*
|
||||||
|
* @brief Linker command file for ARMv4T architecture.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2010 embedded brains GmbH. All rights reserved.
|
||||||
|
*
|
||||||
|
* embedded brains GmbH
|
||||||
|
* Obere Lagerstr. 30
|
||||||
|
* 82178 Puchheim
|
||||||
|
* Germany
|
||||||
|
* <rtems@embedded-brains.de>
|
||||||
|
*
|
||||||
|
* The license and distribution terms for this file may be
|
||||||
|
* found in the file LICENSE in this distribution or at
|
||||||
|
* http://www.rtems.com/license/LICENSE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
bsp_stack_abt_size = DEFINED (bsp_stack_abt_size) ? bsp_stack_abt_size : 128;
|
||||||
|
bsp_stack_abt_size = ALIGN (bsp_stack_abt_size, bsp_stack_align);
|
||||||
|
|
||||||
|
bsp_stack_fiq_size = DEFINED (bsp_stack_fiq_size) ? bsp_stack_fiq_size : 128;
|
||||||
|
bsp_stack_fiq_size = ALIGN (bsp_stack_fiq_size, bsp_stack_align);
|
||||||
|
|
||||||
|
bsp_stack_irq_size = DEFINED (bsp_stack_irq_size) ? bsp_stack_irq_size : 512;
|
||||||
|
bsp_stack_irq_size = ALIGN (bsp_stack_irq_size, bsp_stack_align);
|
||||||
|
|
||||||
|
bsp_stack_svc_size = DEFINED (bsp_stack_svc_size) ? bsp_stack_svc_size : 512;
|
||||||
|
bsp_stack_svc_size = ALIGN (bsp_stack_svc_size, bsp_stack_align);
|
||||||
|
|
||||||
|
bsp_stack_und_size = DEFINED (bsp_stack_und_size) ? bsp_stack_und_size : 128;
|
||||||
|
bsp_stack_und_size = ALIGN (bsp_stack_und_size, bsp_stack_align);
|
||||||
|
|
||||||
|
INCLUDE linkcmds.base
|
||||||
26
c/src/lib/libbsp/arm/shared/startup/linkcmds.armv7
Normal file
26
c/src/lib/libbsp/arm/shared/startup/linkcmds.armv7
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
*
|
||||||
|
* @ingroup bsp_linker
|
||||||
|
*
|
||||||
|
* @brief Linker command file for ARMv7 architecture.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2010 embedded brains GmbH. All rights reserved.
|
||||||
|
*
|
||||||
|
* embedded brains GmbH
|
||||||
|
* Obere Lagerstr. 30
|
||||||
|
* 82178 Puchheim
|
||||||
|
* Germany
|
||||||
|
* <rtems@embedded-brains.de>
|
||||||
|
*
|
||||||
|
* The license and distribution terms for this file may be
|
||||||
|
* found in the file LICENSE in this distribution or at
|
||||||
|
* http://www.rtems.com/license/LICENSE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
bsp_stack_main_size = DEFINED (bsp_stack_main_size) ? bsp_stack_main_size : 4096;
|
||||||
|
bsp_stack_main_size = ALIGN (bsp_stack_main_size, bsp_stack_align);
|
||||||
|
|
||||||
|
INCLUDE linkcmds.base
|
||||||
@@ -7,98 +7,72 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2008
|
* Copyright (c) 2008-2010 embedded brains GmbH. All rights reserved.
|
||||||
* Embedded Brains GmbH
|
|
||||||
* Obere Lagerstr. 30
|
|
||||||
* D-82178 Puchheim
|
|
||||||
* Germany
|
|
||||||
* rtems@embedded-brains.de
|
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be found in the file
|
* embedded brains GmbH
|
||||||
* LICENSE in this distribution or at http://www.rtems.com/license/LICENSE.
|
* Obere Lagerstr. 30
|
||||||
|
* 82178 Puchheim
|
||||||
|
* Germany
|
||||||
|
* <rtems@embedded-brains.de>
|
||||||
|
*
|
||||||
|
* The license and distribution terms for this file may be
|
||||||
|
* found in the file LICENSE in this distribution or at
|
||||||
|
* http://www.rtems.com/license/LICENSE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
|
OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
|
||||||
|
|
||||||
OUTPUT_ARCH (arm)
|
OUTPUT_ARCH (arm)
|
||||||
|
|
||||||
ENTRY (start)
|
ENTRY (_start)
|
||||||
|
|
||||||
bsp_vector_table_size = 64;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* BSP: Global symbols that may be defined externally
|
* Global symbols that may be defined externally
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bsp_stack_align = DEFINED (bsp_stack_align) ? bsp_stack_align : 4;
|
bsp_vector_table_size = DEFINED (bsp_vector_table_size) ? bsp_vector_table_size : 64;
|
||||||
|
|
||||||
bsp_section_align = DEFINED (bsp_section_align) ? bsp_section_align : 32;
|
|
||||||
|
|
||||||
bsp_section_start_end_align = DEFINED (bsp_section_start_end_align) ? bsp_section_start_end_align : bsp_section_align;
|
|
||||||
bsp_section_vector_end_align = DEFINED (bsp_section_vector_end_align) ? bsp_section_vector_end_align : bsp_section_align;
|
|
||||||
bsp_section_text_end_align = DEFINED (bsp_section_text_end_align) ? bsp_section_text_end_align : bsp_section_align;
|
|
||||||
bsp_section_rodata_end_align = DEFINED (bsp_section_rodata_end_align) ? bsp_section_rodata_end_align : bsp_section_align;
|
|
||||||
bsp_section_data_end_align = DEFINED (bsp_section_data_end_align) ? bsp_section_data_end_align : bsp_section_align;
|
|
||||||
bsp_section_fast_end_align = DEFINED (bsp_section_fast_end_align) ? bsp_section_fast_end_align : bsp_section_align;
|
|
||||||
bsp_section_bss_end_align = DEFINED (bsp_section_bss_end_align) ? bsp_section_bss_end_align : bsp_section_align;
|
|
||||||
|
|
||||||
bsp_section_vbarrier_align = DEFINED (bsp_section_vbarrier_align) ? bsp_section_vbarrier_align : 1;
|
bsp_section_vbarrier_align = DEFINED (bsp_section_vbarrier_align) ? bsp_section_vbarrier_align : 1;
|
||||||
bsp_section_robarrier_align = DEFINED (bsp_section_robarrier_align) ? bsp_section_robarrier_align : 1;
|
bsp_section_robarrier_align = DEFINED (bsp_section_robarrier_align) ? bsp_section_robarrier_align : 1;
|
||||||
|
|
||||||
bsp_stack_abt_size = DEFINED (bsp_stack_abt_size) ? bsp_stack_abt_size : 128;
|
bsp_stack_align = DEFINED (bsp_stack_align) ? bsp_stack_align : 8;
|
||||||
|
|
||||||
|
bsp_stack_abt_size = DEFINED (bsp_stack_abt_size) ? bsp_stack_abt_size : 0;
|
||||||
bsp_stack_abt_size = ALIGN (bsp_stack_abt_size, bsp_stack_align);
|
bsp_stack_abt_size = ALIGN (bsp_stack_abt_size, bsp_stack_align);
|
||||||
|
|
||||||
bsp_stack_fiq_size = DEFINED (bsp_stack_fiq_size) ? bsp_stack_fiq_size : 128;
|
bsp_stack_fiq_size = DEFINED (bsp_stack_fiq_size) ? bsp_stack_fiq_size : 0;
|
||||||
bsp_stack_fiq_size = ALIGN (bsp_stack_fiq_size, bsp_stack_align);
|
bsp_stack_fiq_size = ALIGN (bsp_stack_fiq_size, bsp_stack_align);
|
||||||
|
|
||||||
bsp_stack_irq_size = DEFINED (bsp_stack_irq_size) ? bsp_stack_irq_size : 512;
|
bsp_stack_irq_size = DEFINED (bsp_stack_irq_size) ? bsp_stack_irq_size : 0;
|
||||||
bsp_stack_irq_size = ALIGN (bsp_stack_irq_size, bsp_stack_align);
|
bsp_stack_irq_size = ALIGN (bsp_stack_irq_size, bsp_stack_align);
|
||||||
|
|
||||||
bsp_stack_svc_size = DEFINED (bsp_stack_svc_size) ? bsp_stack_svc_size : 512;
|
bsp_stack_svc_size = DEFINED (bsp_stack_svc_size) ? bsp_stack_svc_size : 0;
|
||||||
bsp_stack_svc_size = ALIGN (bsp_stack_svc_size, bsp_stack_align);
|
bsp_stack_svc_size = ALIGN (bsp_stack_svc_size, bsp_stack_align);
|
||||||
|
|
||||||
bsp_stack_und_size = DEFINED (bsp_stack_und_size) ? bsp_stack_und_size : 128;
|
bsp_stack_und_size = DEFINED (bsp_stack_und_size) ? bsp_stack_und_size : 0;
|
||||||
bsp_stack_und_size = ALIGN (bsp_stack_und_size, bsp_stack_align);
|
bsp_stack_und_size = ALIGN (bsp_stack_und_size, bsp_stack_align);
|
||||||
|
|
||||||
|
bsp_stack_main_size = DEFINED (bsp_stack_main_size) ? bsp_stack_main_size : 0;
|
||||||
|
bsp_stack_main_size = ALIGN (bsp_stack_main_size, bsp_stack_align);
|
||||||
|
|
||||||
|
/* FIXME: This should go away when LD is fixed */
|
||||||
|
bsp_section_align = DEFINED (bsp_section_align) ? bsp_section_align : 32;
|
||||||
|
|
||||||
SECTIONS {
|
SECTIONS {
|
||||||
.start : {
|
.start : {
|
||||||
/*
|
|
||||||
* BSP: Begin of start section
|
|
||||||
*/
|
|
||||||
bsp_section_start_begin = .;
|
bsp_section_start_begin = .;
|
||||||
|
KEEP (*(.bsp_start_text))
|
||||||
/*
|
|
||||||
* BSP: System startup entry
|
|
||||||
*/
|
|
||||||
KEEP (*(.bsp_start))
|
|
||||||
KEEP (*(.bsp_start_data))
|
KEEP (*(.bsp_start_data))
|
||||||
|
. = ALIGN (bsp_section_align);
|
||||||
. = ALIGN (bsp_section_start_end_align);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BSP: End of start section
|
|
||||||
*/
|
|
||||||
bsp_section_start_end = .;
|
bsp_section_start_end = .;
|
||||||
} > REGION_START AT > REGION_START
|
} > REGION_START AT > REGION_START
|
||||||
|
|
||||||
bsp_section_start_size = bsp_section_start_end - bsp_section_start_begin;
|
bsp_section_start_size = bsp_section_start_end - bsp_section_start_begin;
|
||||||
|
|
||||||
.vector : {
|
.vector : {
|
||||||
/*
|
|
||||||
* BSP: Begin of vector section
|
|
||||||
*/
|
|
||||||
bsp_section_vector_begin = .;
|
bsp_section_vector_begin = .;
|
||||||
|
|
||||||
/*
|
|
||||||
* BSP: Reserve space for the the exception vector table and
|
|
||||||
* the pointers to the default exceptions handlers.
|
|
||||||
*/
|
|
||||||
. = . + DEFINED (bsp_vector_table_in_start_section) ? 0 : bsp_vector_table_size;
|
. = . + DEFINED (bsp_vector_table_in_start_section) ? 0 : bsp_vector_table_size;
|
||||||
|
|
||||||
/*
|
|
||||||
* BSP: Reserve space for mode stacks
|
|
||||||
*/
|
|
||||||
|
|
||||||
. = ALIGN (bsp_stack_align);
|
. = ALIGN (bsp_stack_align);
|
||||||
|
|
||||||
bsp_stack_abt_begin = .;
|
bsp_stack_abt_begin = .;
|
||||||
@@ -121,21 +95,15 @@ SECTIONS {
|
|||||||
. = . + bsp_stack_und_size;
|
. = . + bsp_stack_und_size;
|
||||||
bsp_stack_und_end = .;
|
bsp_stack_und_end = .;
|
||||||
|
|
||||||
/*
|
bsp_stack_main_begin = .;
|
||||||
* BSP: Special vector data
|
. = . + bsp_stack_main_size;
|
||||||
*/
|
bsp_stack_main_end = .;
|
||||||
|
|
||||||
*(.bsp_vector)
|
*(.bsp_vector)
|
||||||
|
. = ALIGN (bsp_section_align);
|
||||||
. = ALIGN (bsp_section_vector_end_align);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BSP: End of vector section
|
|
||||||
*/
|
|
||||||
bsp_section_vector_end = .;
|
bsp_section_vector_end = .;
|
||||||
} > REGION_VECTOR AT > REGION_VECTOR
|
} > REGION_VECTOR AT > REGION_VECTOR
|
||||||
|
|
||||||
bsp_section_vector_size = bsp_section_vector_end - bsp_section_vector_begin;
|
bsp_section_vector_size = bsp_section_vector_end - bsp_section_vector_begin;
|
||||||
|
|
||||||
bsp_vector_table_begin = DEFINED (bsp_vector_table_in_start_section) ? bsp_section_start_begin : bsp_section_vector_begin;
|
bsp_vector_table_begin = DEFINED (bsp_vector_table_in_start_section) ? bsp_section_start_begin : bsp_section_vector_begin;
|
||||||
bsp_vector_table_end = bsp_vector_table_begin + bsp_vector_table_size;
|
bsp_vector_table_end = bsp_vector_table_begin + bsp_vector_table_size;
|
||||||
|
|
||||||
@@ -143,108 +111,164 @@ SECTIONS {
|
|||||||
. = ALIGN (bsp_section_vbarrier_align);
|
. = ALIGN (bsp_section_vbarrier_align);
|
||||||
} > REGION_VECTOR
|
} > REGION_VECTOR
|
||||||
|
|
||||||
.text : {
|
.interp : {
|
||||||
/*
|
|
||||||
* BSP: Begin of text section
|
|
||||||
*/
|
|
||||||
bsp_section_text_begin = .;
|
bsp_section_text_begin = .;
|
||||||
|
*(.interp)
|
||||||
/*
|
. = ALIGN (bsp_section_align);
|
||||||
* BSP: Moved into .text from .init
|
} > REGION_TEXT AT > REGION_TEXT_LOAD
|
||||||
*/
|
.note.gnu.build-id : {
|
||||||
|
*(.note.gnu.build-id)
|
||||||
|
. = ALIGN (bsp_section_align);
|
||||||
|
} > REGION_TEXT AT > REGION_TEXT_LOAD
|
||||||
|
.hash : {
|
||||||
|
*(.hash)
|
||||||
|
. = ALIGN (bsp_section_align);
|
||||||
|
} > REGION_TEXT AT > REGION_TEXT_LOAD
|
||||||
|
.gnu.hash : {
|
||||||
|
*(.gnu.hash)
|
||||||
|
. = ALIGN (bsp_section_align);
|
||||||
|
} > REGION_TEXT AT > REGION_TEXT_LOAD
|
||||||
|
.dynsym : {
|
||||||
|
*(.dynsym)
|
||||||
|
. = ALIGN (bsp_section_align);
|
||||||
|
} > REGION_TEXT AT > REGION_TEXT_LOAD
|
||||||
|
.dynstr : {
|
||||||
|
*(.dynstr)
|
||||||
|
. = ALIGN (bsp_section_align);
|
||||||
|
} > REGION_TEXT AT > REGION_TEXT_LOAD
|
||||||
|
.gnu.version : {
|
||||||
|
*(.gnu.version)
|
||||||
|
. = ALIGN (bsp_section_align);
|
||||||
|
} > REGION_TEXT AT > REGION_TEXT_LOAD
|
||||||
|
.gnu.version_d : {
|
||||||
|
*(.gnu.version_d)
|
||||||
|
. = ALIGN (bsp_section_align);
|
||||||
|
}
|
||||||
|
> REGION_TEXT AT > REGION_TEXT_LOAD
|
||||||
|
.gnu.version_r : {
|
||||||
|
*(.gnu.version_r)
|
||||||
|
. = ALIGN (bsp_section_align);
|
||||||
|
} > REGION_TEXT AT > REGION_TEXT_LOAD
|
||||||
|
.rel.dyn : {
|
||||||
|
*(.rel.init)
|
||||||
|
*(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
|
||||||
|
*(.rel.fini)
|
||||||
|
*(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
|
||||||
|
*(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*)
|
||||||
|
*(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
|
||||||
|
*(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
|
||||||
|
*(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
|
||||||
|
*(.rel.ctors)
|
||||||
|
*(.rel.dtors)
|
||||||
|
*(.rel.got)
|
||||||
|
*(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
|
||||||
|
PROVIDE_HIDDEN (__rel_iplt_start = .);
|
||||||
|
*(.rel.iplt)
|
||||||
|
PROVIDE_HIDDEN (__rel_iplt_end = .);
|
||||||
|
PROVIDE_HIDDEN (__rela_iplt_start = .);
|
||||||
|
PROVIDE_HIDDEN (__rela_iplt_end = .);
|
||||||
|
. = ALIGN (bsp_section_align);
|
||||||
|
} > REGION_TEXT AT > REGION_TEXT_LOAD
|
||||||
|
.rela.dyn : {
|
||||||
|
*(.rela.init)
|
||||||
|
*(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
|
||||||
|
*(.rela.fini)
|
||||||
|
*(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
|
||||||
|
*(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
|
||||||
|
*(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
|
||||||
|
*(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
|
||||||
|
*(.rela.ctors)
|
||||||
|
*(.rela.dtors)
|
||||||
|
*(.rela.got)
|
||||||
|
*(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
|
||||||
|
PROVIDE_HIDDEN (__rel_iplt_start = .);
|
||||||
|
PROVIDE_HIDDEN (__rel_iplt_end = .);
|
||||||
|
PROVIDE_HIDDEN (__rela_iplt_start = .);
|
||||||
|
*(.rela.iplt)
|
||||||
|
PROVIDE_HIDDEN (__rela_iplt_end = .);
|
||||||
|
. = ALIGN (bsp_section_align);
|
||||||
|
} > REGION_TEXT AT > REGION_TEXT_LOAD
|
||||||
|
.rel.plt : {
|
||||||
|
*(.rel.plt)
|
||||||
|
. = ALIGN (bsp_section_align);
|
||||||
|
} > REGION_TEXT AT > REGION_TEXT_LOAD
|
||||||
|
.rela.plt : {
|
||||||
|
*(.rela.plt)
|
||||||
|
. = ALIGN (bsp_section_align);
|
||||||
|
} > REGION_TEXT AT > REGION_TEXT_LOAD
|
||||||
|
.init : {
|
||||||
KEEP (*(.init))
|
KEEP (*(.init))
|
||||||
|
. = ALIGN (bsp_section_align);
|
||||||
|
} > REGION_TEXT AT > REGION_TEXT_LOAD
|
||||||
|
.fini : {
|
||||||
|
KEEP (*(.fini))
|
||||||
|
. = ALIGN (bsp_section_align);
|
||||||
|
} > REGION_TEXT AT > REGION_TEXT_LOAD
|
||||||
|
.plt : {
|
||||||
|
*(.plt)
|
||||||
|
. = ALIGN (bsp_section_align);
|
||||||
|
} > REGION_TEXT AT > REGION_TEXT_LOAD
|
||||||
|
.iplt : {
|
||||||
|
*(.iplt)
|
||||||
|
. = ALIGN (bsp_section_align);
|
||||||
|
} > REGION_TEXT AT > REGION_TEXT_LOAD
|
||||||
|
.text : {
|
||||||
|
*(.text.unlikely .text.*_unlikely)
|
||||||
*(.text .stub .text.* .gnu.linkonce.t.*)
|
*(.text .stub .text.* .gnu.linkonce.t.*)
|
||||||
KEEP (*(.text.*personality*))
|
|
||||||
/* .gnu.warning sections are handled specially by elf32.em. */
|
/* .gnu.warning sections are handled specially by elf32.em. */
|
||||||
*(.gnu.warning)
|
*(.gnu.warning)
|
||||||
|
*(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx)
|
||||||
/*
|
. = ALIGN (bsp_section_align);
|
||||||
* BSP: Magic ARM stuff
|
|
||||||
*/
|
|
||||||
*(.ARM.*)
|
|
||||||
*(.glue_7)
|
|
||||||
*(.glue_7t)
|
|
||||||
*(.vfp11_veneer)
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BSP: Special FreeBSD sysctl sections
|
|
||||||
*/
|
|
||||||
. = ALIGN (16);
|
|
||||||
__start_set_sysctl_set = .;
|
|
||||||
*(set_sysctl_*);
|
|
||||||
__stop_set_sysctl_set = ABSOLUTE(.);
|
|
||||||
*(set_domain_*);
|
|
||||||
*(set_pseudo_*);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BSP: Moved into .text from .*
|
|
||||||
*/
|
|
||||||
*(.eh_frame_hdr)
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BSP: Required by cpukit/score/src/threadhandler.c
|
|
||||||
*/
|
|
||||||
PROVIDE (_fini = .);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BSP: Moved into .text from .fini
|
|
||||||
*/
|
|
||||||
KEEP (*(.fini))
|
|
||||||
|
|
||||||
. = ALIGN (bsp_section_text_end_align);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BSP: End of text section
|
|
||||||
*/
|
|
||||||
bsp_section_text_end = .;
|
bsp_section_text_end = .;
|
||||||
} > REGION_TEXT AT > REGION_TEXT_LOAD
|
} > REGION_TEXT AT > REGION_TEXT_LOAD
|
||||||
|
|
||||||
bsp_section_text_size = bsp_section_text_end - bsp_section_text_begin;
|
bsp_section_text_size = bsp_section_text_end - bsp_section_text_begin;
|
||||||
|
bsp_section_text_load_begin = LOADADDR (.interp);
|
||||||
|
bsp_section_text_load_end = bsp_section_text_load_begin + bsp_section_text_size;
|
||||||
|
|
||||||
bsp_section_text_load_begin = LOADADDR (.text);
|
.rodata1 : {
|
||||||
|
|
||||||
.rodata : {
|
|
||||||
/*
|
|
||||||
* BSP: Begin of rodata section
|
|
||||||
*/
|
|
||||||
bsp_section_rodata_begin = .;
|
bsp_section_rodata_begin = .;
|
||||||
|
|
||||||
__start_set_modmetadata_set = .;
|
|
||||||
*(set_modmetadata_set);
|
|
||||||
__stop_set_modmetadata_set = .;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BSP: Moved into .rodata from .*
|
|
||||||
*/
|
|
||||||
*(.rodata .rodata.* .gnu.linkonce.r.*)
|
|
||||||
*(.rodata1)
|
*(.rodata1)
|
||||||
|
. = ALIGN (bsp_section_align);
|
||||||
. = ALIGN (bsp_section_rodata_end_align);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BSP: End of rodata section
|
|
||||||
*/
|
|
||||||
bsp_section_rodata_end = .;
|
|
||||||
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||||
|
.ARM.extab : {
|
||||||
bsp_section_rodata_size = bsp_section_rodata_end - bsp_section_rodata_begin;
|
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||||
|
. = ALIGN (bsp_section_align);
|
||||||
bsp_section_rodata_load_begin = LOADADDR (.rodata);
|
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||||
|
.ARM.exidx : {
|
||||||
.robarrier : {
|
__exidx_start = .;
|
||||||
. = ALIGN (bsp_section_robarrier_align);
|
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
|
||||||
} > REGION_RODATA
|
__exidx_end = .;
|
||||||
|
. = ALIGN (bsp_section_align);
|
||||||
.data : {
|
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||||
/*
|
.eh_frame : {
|
||||||
* BSP: Begin of data section
|
KEEP (*(.eh_frame))
|
||||||
*/
|
. = ALIGN (bsp_section_align);
|
||||||
bsp_section_data_begin = .;
|
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||||
|
.gcc_except_table : {
|
||||||
/*
|
*(.gcc_except_table .gcc_except_table.*)
|
||||||
* BSP: Moved into .data from .ctors
|
. = ALIGN (bsp_section_align);
|
||||||
*/
|
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||||
|
.preinit_array : {
|
||||||
|
PROVIDE_HIDDEN (__preinit_array_start = .);
|
||||||
|
KEEP (*(.preinit_array))
|
||||||
|
PROVIDE_HIDDEN (__preinit_array_end = .);
|
||||||
|
. = ALIGN (bsp_section_align);
|
||||||
|
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||||
|
.init_array : {
|
||||||
|
PROVIDE_HIDDEN (__init_array_start = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array))
|
||||||
|
PROVIDE_HIDDEN (__init_array_end = .);
|
||||||
|
. = ALIGN (bsp_section_align);
|
||||||
|
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||||
|
.fini_array : {
|
||||||
|
PROVIDE_HIDDEN (__fini_array_start = .);
|
||||||
|
KEEP (*(.fini_array))
|
||||||
|
KEEP (*(SORT(.fini_array.*)))
|
||||||
|
PROVIDE_HIDDEN (__fini_array_end = .);
|
||||||
|
. = ALIGN (bsp_section_align);
|
||||||
|
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||||
|
.ctors : {
|
||||||
/* gcc uses crtbegin.o to find the start of
|
/* gcc uses crtbegin.o to find the start of
|
||||||
the constructors, so we make sure it is
|
the constructors, so we make sure it is
|
||||||
first. Because this is a wildcard, it
|
first. Because this is a wildcard, it
|
||||||
@@ -263,119 +287,137 @@ SECTIONS {
|
|||||||
KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
|
KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
|
||||||
KEEP (*(SORT(.ctors.*)))
|
KEEP (*(SORT(.ctors.*)))
|
||||||
KEEP (*(.ctors))
|
KEEP (*(.ctors))
|
||||||
|
. = ALIGN (bsp_section_align);
|
||||||
/*
|
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||||
* BSP: Moved into .data from .dtors
|
.dtors : {
|
||||||
*/
|
|
||||||
KEEP (*crtbegin.o(.dtors))
|
KEEP (*crtbegin.o(.dtors))
|
||||||
KEEP (*crtbegin?.o(.dtors))
|
KEEP (*crtbegin?.o(.dtors))
|
||||||
KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
|
KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
|
||||||
KEEP (*(SORT(.dtors.*)))
|
KEEP (*(SORT(.dtors.*)))
|
||||||
KEEP (*(.dtors))
|
KEEP (*(.dtors))
|
||||||
|
. = ALIGN (bsp_section_align);
|
||||||
/*
|
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||||
* BSP: Moved into .data from .*
|
.data.rel.ro : {
|
||||||
*/
|
*(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*)
|
||||||
*(.data1)
|
*(.data.rel.ro* .gnu.linkonce.d.rel.ro.*)
|
||||||
KEEP (*(.eh_frame))
|
. = ALIGN (bsp_section_align);
|
||||||
*(.gcc_except_table .gcc_except_table.*)
|
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||||
|
.jcr : {
|
||||||
KEEP (*(.jcr))
|
KEEP (*(.jcr))
|
||||||
|
. = ALIGN (bsp_section_align);
|
||||||
|
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||||
|
.dynamic : {
|
||||||
|
*(.dynamic)
|
||||||
|
. = ALIGN (bsp_section_align);
|
||||||
|
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||||
|
.got : {
|
||||||
|
*(.got.plt) *(.igot.plt) *(.got) *(.igot)
|
||||||
|
. = ALIGN (bsp_section_align);
|
||||||
|
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||||
|
.rodata : {
|
||||||
|
/* Special FreeBSD sysctl sections */
|
||||||
|
. = ALIGN (16);
|
||||||
|
__start_set_sysctl_set = .;
|
||||||
|
*(set_sysctl_*);
|
||||||
|
__stop_set_sysctl_set = ABSOLUTE(.);
|
||||||
|
*(set_domain_*);
|
||||||
|
*(set_pseudo_*);
|
||||||
|
_bsd__start_set_sysinit_set = .;
|
||||||
|
*(_bsd_set_sysinit_set);
|
||||||
|
_bsd__stop_set_sysinit_set = .;
|
||||||
|
_bsd__start_set_modmetadata_set = .;
|
||||||
|
*(_bsd_set_modmetadata_set);
|
||||||
|
_bsd__stop_set_modmetadata_set = .;
|
||||||
|
_bsd__start_set_sysctl_set = .;
|
||||||
|
*(_bsd_set_sysctl_set);
|
||||||
|
_bsd__stop_set_sysctl_set = .;
|
||||||
|
|
||||||
|
*(.rodata .rodata.* .gnu.linkonce.r.*)
|
||||||
|
. = ALIGN (bsp_section_align);
|
||||||
|
bsp_section_rodata_end = .;
|
||||||
|
} > REGION_RODATA AT > REGION_RODATA_LOAD
|
||||||
|
bsp_section_rodata_size = bsp_section_rodata_end - bsp_section_rodata_begin;
|
||||||
|
bsp_section_rodata_load_begin = LOADADDR (.rodata1);
|
||||||
|
bsp_section_rodata_load_end = bsp_section_rodata_load_begin + bsp_section_rodata_size;
|
||||||
|
|
||||||
|
.robarrier : {
|
||||||
|
. = ALIGN (bsp_section_robarrier_align);
|
||||||
|
} > REGION_RODATA
|
||||||
|
|
||||||
|
.data1 : {
|
||||||
|
bsp_section_data_begin = .;
|
||||||
|
*(.data1)
|
||||||
|
. = ALIGN (bsp_section_align);
|
||||||
|
} > REGION_DATA AT > REGION_DATA_LOAD
|
||||||
|
.data : {
|
||||||
*(.data .data.* .gnu.linkonce.d.*)
|
*(.data .data.* .gnu.linkonce.d.*)
|
||||||
KEEP (*(.gnu.linkonce.d.*personality*))
|
|
||||||
SORT(CONSTRUCTORS)
|
SORT(CONSTRUCTORS)
|
||||||
|
. = ALIGN (bsp_section_align);
|
||||||
. = ALIGN (bsp_section_data_end_align);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BSP: End of data section
|
|
||||||
*/
|
|
||||||
bsp_section_data_end = .;
|
bsp_section_data_end = .;
|
||||||
} > REGION_DATA AT > REGION_DATA_LOAD
|
} > REGION_DATA AT > REGION_DATA_LOAD
|
||||||
|
|
||||||
bsp_section_data_size = bsp_section_data_end - bsp_section_data_begin;
|
bsp_section_data_size = bsp_section_data_end - bsp_section_data_begin;
|
||||||
|
bsp_section_data_load_begin = LOADADDR (.data1);
|
||||||
|
bsp_section_data_load_end = bsp_section_data_load_begin + bsp_section_data_size;
|
||||||
|
|
||||||
bsp_section_data_load_begin = LOADADDR (.data);
|
.fast_text : {
|
||||||
|
bsp_section_fast_text_begin = .;
|
||||||
.fast : {
|
*(.bsp_fast_text)
|
||||||
bsp_section_fast_begin = .;
|
. = ALIGN (bsp_section_align);
|
||||||
|
bsp_section_fast_text_end = .;
|
||||||
*(.bsp_fast)
|
|
||||||
|
|
||||||
. = ALIGN (bsp_section_fast_end_align);
|
|
||||||
|
|
||||||
bsp_section_fast_end = .;
|
|
||||||
} > REGION_FAST AT > REGION_FAST_LOAD
|
} > REGION_FAST AT > REGION_FAST_LOAD
|
||||||
|
bsp_section_fast_text_size = bsp_section_fast_text_end - bsp_section_fast_text_begin;
|
||||||
|
bsp_section_fast_text_load_begin = LOADADDR (.fast_text);
|
||||||
|
bsp_section_fast_text_load_end = bsp_section_fast_text_load_begin + bsp_section_fast_text_size;
|
||||||
|
|
||||||
bsp_section_fast_size = bsp_section_fast_end - bsp_section_fast_begin;
|
.fast_data : {
|
||||||
|
bsp_section_fast_data_begin = .;
|
||||||
bsp_section_fast_load_begin = LOADADDR (.fast);
|
*(.bsp_fast_data)
|
||||||
|
. = ALIGN (bsp_section_align);
|
||||||
|
bsp_section_fast_data_end = .;
|
||||||
|
} > REGION_FAST AT > REGION_FAST_LOAD
|
||||||
|
bsp_section_fast_data_size = bsp_section_fast_data_end - bsp_section_fast_data_begin;
|
||||||
|
bsp_section_fast_data_load_begin = LOADADDR (.fast_data);
|
||||||
|
bsp_section_fast_data_load_end = bsp_section_fast_data_load_begin + bsp_section_fast_data_size;
|
||||||
|
|
||||||
.bss : {
|
.bss : {
|
||||||
/*
|
|
||||||
* BSP: Begin of bss section
|
|
||||||
*/
|
|
||||||
bsp_section_bss_begin = .;
|
bsp_section_bss_begin = .;
|
||||||
|
|
||||||
*(COMMON)
|
|
||||||
*(.dynbss)
|
*(.dynbss)
|
||||||
*(.bss .bss.* .gnu.linkonce.b.*)
|
*(.bss .bss.* .gnu.linkonce.b.*)
|
||||||
|
*(COMMON)
|
||||||
. = ALIGN (bsp_section_bss_end_align);
|
. = ALIGN (bsp_section_align);
|
||||||
|
|
||||||
/*
|
|
||||||
* BSP: End of bss section
|
|
||||||
*/
|
|
||||||
bsp_section_bss_end = .;
|
bsp_section_bss_end = .;
|
||||||
} > REGION_BSS AT > REGION_BSS
|
} > REGION_BSS AT > REGION_BSS
|
||||||
|
|
||||||
bsp_section_bss_size = bsp_section_bss_end - bsp_section_bss_begin;
|
bsp_section_bss_size = bsp_section_bss_end - bsp_section_bss_begin;
|
||||||
|
|
||||||
.work : {
|
.work : {
|
||||||
/*
|
/*
|
||||||
* BSP: Begin of work section. The work section will occupy
|
* The work section will occupy the remaining REGION_WORK region and
|
||||||
* the remaining REGION_WORK region and contains the RTEMS work
|
* contains the RTEMS work space and heap.
|
||||||
* space and heap.
|
|
||||||
*/
|
*/
|
||||||
bsp_section_work_begin = .;
|
bsp_section_work_begin = .;
|
||||||
|
|
||||||
. += ORIGIN (REGION_WORK) + LENGTH (REGION_WORK) - ABSOLUTE (.);
|
. += ORIGIN (REGION_WORK) + LENGTH (REGION_WORK) - ABSOLUTE (.);
|
||||||
|
|
||||||
/*
|
|
||||||
* BSP: End of work section
|
|
||||||
*/
|
|
||||||
bsp_section_work_end = .;
|
bsp_section_work_end = .;
|
||||||
} > REGION_WORK AT > REGION_WORK
|
} > REGION_WORK AT > REGION_WORK
|
||||||
|
|
||||||
bsp_section_work_size = bsp_section_work_end - bsp_section_work_begin;
|
bsp_section_work_size = bsp_section_work_end - bsp_section_work_begin;
|
||||||
|
|
||||||
.stack : {
|
.stack : {
|
||||||
/*
|
/*
|
||||||
* BSP: Begin of stack section. The stack section will occupy
|
* The stack section will occupy the remaining REGION_STACK region and may
|
||||||
* the remaining REGION_STACK region and may contain the task
|
* contain the task stacks. Depending on the region distribution this
|
||||||
* stacks. Depending on the region distribution this section
|
* section may be of zero size.
|
||||||
* may be of zero size.
|
|
||||||
*/
|
*/
|
||||||
bsp_section_stack_begin = .;
|
bsp_section_stack_begin = .;
|
||||||
|
|
||||||
. += ORIGIN (REGION_STACK) + LENGTH (REGION_STACK) - ABSOLUTE (.);
|
. += ORIGIN (REGION_STACK) + LENGTH (REGION_STACK) - ABSOLUTE (.);
|
||||||
|
|
||||||
/*
|
|
||||||
* BSP: End of stack section
|
|
||||||
*/
|
|
||||||
bsp_section_stack_end = .;
|
bsp_section_stack_end = .;
|
||||||
} > REGION_STACK AT > REGION_STACK
|
} > REGION_STACK AT > REGION_STACK
|
||||||
|
|
||||||
bsp_section_stack_size = bsp_section_stack_end - bsp_section_stack_begin;
|
bsp_section_stack_size = bsp_section_stack_end - bsp_section_stack_begin;
|
||||||
|
|
||||||
/*
|
/* FIXME */
|
||||||
* BSP: External symbols (FIXME)
|
|
||||||
*/
|
|
||||||
RamBase = ORIGIN (REGION_WORK);
|
RamBase = ORIGIN (REGION_WORK);
|
||||||
RamSize = LENGTH (REGION_WORK);
|
RamSize = LENGTH (REGION_WORK);
|
||||||
WorkAreaBase = bsp_section_work_begin;
|
WorkAreaBase = bsp_section_work_begin;
|
||||||
HeapSize = 0;
|
HeapSize = 0;
|
||||||
|
|
||||||
/* Stabs debugging sections. */
|
/* Stabs debugging sections. */
|
||||||
.stab 0 : { *(.stab) }
|
.stab 0 : { *(.stab) }
|
||||||
.stabstr 0 : { *(.stabstr) }
|
.stabstr 0 : { *(.stabstr) }
|
||||||
@@ -412,16 +454,10 @@ SECTIONS {
|
|||||||
/* DWARF 3 */
|
/* DWARF 3 */
|
||||||
.debug_pubtypes 0 : { *(.debug_pubtypes) }
|
.debug_pubtypes 0 : { *(.debug_pubtypes) }
|
||||||
.debug_ranges 0 : { *(.debug_ranges) }
|
.debug_ranges 0 : { *(.debug_ranges) }
|
||||||
.gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
|
.ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }
|
||||||
|
.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
|
||||||
|
/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }
|
||||||
|
|
||||||
/DISCARD/ : {
|
/* Catch all unknown sections */
|
||||||
*(.note.GNU-stack) *(.gnu_debuglink)
|
.nirvana : { *(*) } > NIRVANA
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* BSP: Catch all unknown sections
|
|
||||||
*/
|
|
||||||
.nirvana : {
|
|
||||||
*(*)
|
|
||||||
} > NIRVANA
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user