Changeset a3579d3b in rtems


Ignore:
Timestamp:
12/03/10 09:23:52 (13 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, master
Children:
598a4505
Parents:
87b4f123
Message:

2010-12-03 Sebastian Huber <sebastian.huber@…>

  • 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.
Location:
c/src/lib/libbsp/arm
Files:
4 added
6 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/ChangeLog

    r87b4f123 ra3579d3b  
     12010-12-03      Sebastian Huber <sebastian.huber@embedded-brains.de>
     2
     3        * preinstall.am, shared/lpc/include/lpc-i2s.h,
     4        shared/startup/linkcmds.armv4, shared/startup/linkcmds.armv7: New
     5        files.
     6        * Makefile.am: Added header and linker command files intended to be
     7        used by every ARM BSP.
     8        * shared/startup/linkcmds.base: Support for EABI and ARM ELF standard.
     9        * shared/include/linker-symbols.h: Update due to linker command file
     10        changes.
     11        * shared/start/start.S, shared/include/start.h: Renamed entry symbol
     12        from start to _start to avoid namespace conflicts.  Update due to
     13        linker command file changes.
     14
    1152010-11-23      Gedare Bloom <giddyup44@yahoo.com>
    216
  • c/src/lib/libbsp/arm/Makefile.am

    r87b4f123 ra3579d3b  
    1010SUBDIRS = @RTEMS_BSP_FAMILY@
    1111
     12include_bspdir = $(includedir)/bsp
     13include_bsp_HEADERS = shared/include/linker-symbols.h
     14
     15dist_project_lib_DATA = shared/startup/linkcmds.base
     16dist_project_lib_DATA += shared/startup/linkcmds.armv4
     17dist_project_lib_DATA += shared/startup/linkcmds.armv7
     18
    1219EXTRA_DIST =
    1320
     
    1926EXTRA_DIST += shared/abort/simple_abort.c
    2027
     28include $(srcdir)/preinstall.am
    2129include $(top_srcdir)/../../../automake/subdirs.am
    2230include $(top_srcdir)/../../../automake/local.am
  • c/src/lib/libbsp/arm/shared/include/linker-symbols.h

    r87b4f123 ra3579d3b  
    7575LINKER_SYMBOL(bsp_section_text_size)
    7676LINKER_SYMBOL(bsp_section_text_load_begin)
     77LINKER_SYMBOL(bsp_section_text_load_end)
    7778
    7879LINKER_SYMBOL(bsp_section_rodata_begin)
     
    8081LINKER_SYMBOL(bsp_section_rodata_size)
    8182LINKER_SYMBOL(bsp_section_rodata_load_begin)
     83LINKER_SYMBOL(bsp_section_rodata_load_end)
    8284
    8385LINKER_SYMBOL(bsp_section_data_begin)
     
    8587LINKER_SYMBOL(bsp_section_data_size)
    8688LINKER_SYMBOL(bsp_section_data_load_begin)
     89LINKER_SYMBOL(bsp_section_data_load_end)
    8790
    88 LINKER_SYMBOL(bsp_section_fast_begin)
    89 LINKER_SYMBOL(bsp_section_fast_end)
    90 LINKER_SYMBOL(bsp_section_fast_size)
    91 LINKER_SYMBOL(bsp_section_fast_load_begin)
     91LINKER_SYMBOL(bsp_section_fast_text_begin)
     92LINKER_SYMBOL(bsp_section_fast_text_end)
     93LINKER_SYMBOL(bsp_section_fast_text_size)
     94LINKER_SYMBOL(bsp_section_fast_text_load_begin)
     95LINKER_SYMBOL(bsp_section_fast_text_load_end)
     96
     97LINKER_SYMBOL(bsp_section_fast_data_begin)
     98LINKER_SYMBOL(bsp_section_fast_data_end)
     99LINKER_SYMBOL(bsp_section_fast_data_size)
     100LINKER_SYMBOL(bsp_section_fast_data_load_begin)
     101LINKER_SYMBOL(bsp_section_fast_data_load_end)
    92102
    93103LINKER_SYMBOL(bsp_section_bss_begin)
     
    107117LINKER_SYMBOL(bsp_vector_table_size)
    108118
     119#define BSP_FAST_TEXT_SECTION __attribute__((section(".bsp_fast_text")))
     120
     121#define BSP_FAST_DATA_SECTION __attribute__((section(".bsp_fast_data")))
     122
    109123/** @} */
    110124
  • c/src/lib/libbsp/arm/shared/include/start.h

    r87b4f123 ra3579d3b  
    3939 */
    4040
    41 #define BSP_START_SECTION __attribute__((section(".bsp_start")))
     41#define BSP_START_TEXT_SECTION __attribute__((section(".bsp_start_text")))
    4242
    4343#define BSP_START_DATA_SECTION __attribute__((section(".bsp_start_data")))
     
    4646* @brief System start entry.
    4747*/
    48 void start(void);
     48void _start(void);
    4949
    5050/**
  • c/src/lib/libbsp/arm/shared/start/start.S

    r87b4f123 ra3579d3b  
    3333/* Global symbols */
    3434
    35 .globl start
     35.globl _start
    3636.globl bsp_start_memcpy
    3737
    38 .section ".bsp_start", "ax"
     38.section ".bsp_start_text", "ax"
    3939
    4040.arm
     
    6464        .word   BSP_START_RESET_VECTOR
    6565#else
    66         .word   start
     66        .word   _start
    6767#endif
    6868
     
    9797/* Start entry */
    9898
    99 start:
     99_start:
    100100
    101101        /*
  • c/src/lib/libbsp/arm/shared/startup/linkcmds.base

    r87b4f123 ra3579d3b  
    88
    99/*
    10  * Copyright (c) 2008
    11  * Embedded Brains GmbH
    12  * Obere Lagerstr. 30
    13  * D-82178 Puchheim
    14  * Germany
    15  * rtems@embedded-brains.de
     10 * Copyright (c) 2008-2010 embedded brains GmbH.  All rights reserved.
    1611 *
    17  * The license and distribution terms for this file may be found in the file
    18  * LICENSE in this distribution or at http://www.rtems.com/license/LICENSE.
     12 *  embedded brains GmbH
     13 *  Obere Lagerstr. 30
     14 *  82178 Puchheim
     15 *  Germany
     16 *  <rtems@embedded-brains.de>
     17 *
     18 * The license and distribution terms for this file may be
     19 * found in the file LICENSE in this distribution or at
     20 * http://www.rtems.com/license/LICENSE.
    1921 */
    2022
     
    2325OUTPUT_ARCH (arm)
    2426
    25 ENTRY (start)
    26 
    27 bsp_vector_table_size = 64;
     27ENTRY (_start)
    2828
    2929/*
    30  * BSP: Global symbols that may be defined externally
     30 * Global symbols that may be defined externally
    3131 */
    3232
    33 bsp_stack_align = DEFINED (bsp_stack_align) ? bsp_stack_align : 4;
    34 
    35 bsp_section_align = DEFINED (bsp_section_align) ? bsp_section_align : 32;
    36 
    37 bsp_section_start_end_align = DEFINED (bsp_section_start_end_align) ? bsp_section_start_end_align : bsp_section_align;
    38 bsp_section_vector_end_align = DEFINED (bsp_section_vector_end_align) ? bsp_section_vector_end_align : bsp_section_align;
    39 bsp_section_text_end_align = DEFINED (bsp_section_text_end_align) ? bsp_section_text_end_align : bsp_section_align;
    40 bsp_section_rodata_end_align = DEFINED (bsp_section_rodata_end_align) ? bsp_section_rodata_end_align : bsp_section_align;
    41 bsp_section_data_end_align = DEFINED (bsp_section_data_end_align) ? bsp_section_data_end_align : bsp_section_align;
    42 bsp_section_fast_end_align = DEFINED (bsp_section_fast_end_align) ? bsp_section_fast_end_align : bsp_section_align;
    43 bsp_section_bss_end_align = DEFINED (bsp_section_bss_end_align) ? bsp_section_bss_end_align : bsp_section_align;
     33bsp_vector_table_size = DEFINED (bsp_vector_table_size) ? bsp_vector_table_size : 64;
    4434
    4535bsp_section_vbarrier_align = DEFINED (bsp_section_vbarrier_align) ? bsp_section_vbarrier_align : 1;
    4636bsp_section_robarrier_align = DEFINED (bsp_section_robarrier_align) ? bsp_section_robarrier_align : 1;
    4737
    48 bsp_stack_abt_size = DEFINED (bsp_stack_abt_size) ? bsp_stack_abt_size : 128;
     38bsp_stack_align = DEFINED (bsp_stack_align) ? bsp_stack_align : 8;
     39
     40bsp_stack_abt_size = DEFINED (bsp_stack_abt_size) ? bsp_stack_abt_size : 0;
    4941bsp_stack_abt_size = ALIGN (bsp_stack_abt_size, bsp_stack_align);
    5042
    51 bsp_stack_fiq_size = DEFINED (bsp_stack_fiq_size) ? bsp_stack_fiq_size : 128;
     43bsp_stack_fiq_size = DEFINED (bsp_stack_fiq_size) ? bsp_stack_fiq_size : 0;
    5244bsp_stack_fiq_size = ALIGN (bsp_stack_fiq_size, bsp_stack_align);
    5345
    54 bsp_stack_irq_size = DEFINED (bsp_stack_irq_size) ? bsp_stack_irq_size : 512;
     46bsp_stack_irq_size = DEFINED (bsp_stack_irq_size) ? bsp_stack_irq_size : 0;
    5547bsp_stack_irq_size = ALIGN (bsp_stack_irq_size, bsp_stack_align);
    5648
    57 bsp_stack_svc_size = DEFINED (bsp_stack_svc_size) ? bsp_stack_svc_size : 512;
     49bsp_stack_svc_size = DEFINED (bsp_stack_svc_size) ? bsp_stack_svc_size : 0;
    5850bsp_stack_svc_size = ALIGN (bsp_stack_svc_size, bsp_stack_align);
    5951
    60 bsp_stack_und_size = DEFINED (bsp_stack_und_size) ? bsp_stack_und_size : 128;
     52bsp_stack_und_size = DEFINED (bsp_stack_und_size) ? bsp_stack_und_size : 0;
    6153bsp_stack_und_size = ALIGN (bsp_stack_und_size, bsp_stack_align);
     54
     55bsp_stack_main_size = DEFINED (bsp_stack_main_size) ? bsp_stack_main_size : 0;
     56bsp_stack_main_size = ALIGN (bsp_stack_main_size, bsp_stack_align);
     57
     58/* FIXME: This should go away when LD is fixed */
     59bsp_section_align = DEFINED (bsp_section_align) ? bsp_section_align : 32;
    6260
    6361SECTIONS {
    6462        .start : {
    65                 /*
    66                  * BSP: Begin of start section
    67                  */
    6863                bsp_section_start_begin = .;
    69 
    70                 /*
    71                  * BSP: System startup entry
    72                  */
    73                 KEEP (*(.bsp_start))
     64                KEEP (*(.bsp_start_text))
    7465                KEEP (*(.bsp_start_data))
    75 
    76                 . = ALIGN (bsp_section_start_end_align);
    77 
    78                 /*
    79                  * BSP: End of start section
    80                  */
     66                . = ALIGN (bsp_section_align);
    8167                bsp_section_start_end = .;
    8268        } > REGION_START AT > REGION_START
    83 
    8469        bsp_section_start_size = bsp_section_start_end - bsp_section_start_begin;
    8570
    8671        .vector : {
    87                 /*
    88                  * BSP: Begin of vector section
    89                  */
    9072                bsp_section_vector_begin = .;
    9173
    92                 /*
    93                  * BSP: Reserve space for the the exception vector table and
    94                  * the pointers to the default exceptions handlers.
    95                  */
    9674                . = . + DEFINED (bsp_vector_table_in_start_section) ? 0 : bsp_vector_table_size;
    97 
    98                 /*
    99                  * BSP: Reserve space for mode stacks
    100                  */
    10175
    10276                . = ALIGN (bsp_stack_align);
     
    12296                bsp_stack_und_end = .;
    12397
    124                 /*
    125                  * BSP: Special vector data
    126                  */
     98                bsp_stack_main_begin = .;
     99                . = . + bsp_stack_main_size;
     100                bsp_stack_main_end = .;
     101
    127102                *(.bsp_vector)
    128 
    129                 . = ALIGN (bsp_section_vector_end_align);
    130 
    131                 /*
    132                  * BSP: End of vector section
    133                  */
     103                . = ALIGN (bsp_section_align);
    134104                bsp_section_vector_end = .;
    135105        } > REGION_VECTOR AT > REGION_VECTOR
    136 
    137106        bsp_section_vector_size = bsp_section_vector_end - bsp_section_vector_begin;
    138 
    139107        bsp_vector_table_begin = DEFINED (bsp_vector_table_in_start_section) ? bsp_section_start_begin : bsp_section_vector_begin;
    140108        bsp_vector_table_end = bsp_vector_table_begin + bsp_vector_table_size;
     
    144112        } > REGION_VECTOR
    145113
     114        .interp : {
     115                bsp_section_text_begin = .;
     116                *(.interp)
     117                . = ALIGN (bsp_section_align);
     118        } > REGION_TEXT AT > REGION_TEXT_LOAD
     119        .note.gnu.build-id : {
     120                *(.note.gnu.build-id)
     121                . = ALIGN (bsp_section_align);
     122        } > REGION_TEXT AT > REGION_TEXT_LOAD
     123        .hash : {
     124                *(.hash)
     125                . = ALIGN (bsp_section_align);
     126        } > REGION_TEXT AT > REGION_TEXT_LOAD
     127        .gnu.hash : {
     128                *(.gnu.hash)
     129                . = ALIGN (bsp_section_align);
     130        } > REGION_TEXT AT > REGION_TEXT_LOAD
     131        .dynsym : {
     132                *(.dynsym)
     133                . = ALIGN (bsp_section_align);
     134        } > REGION_TEXT AT > REGION_TEXT_LOAD
     135        .dynstr : {
     136                *(.dynstr)
     137                . = ALIGN (bsp_section_align);
     138        } > REGION_TEXT AT > REGION_TEXT_LOAD
     139        .gnu.version : {
     140                *(.gnu.version)
     141                . = ALIGN (bsp_section_align);
     142        } > REGION_TEXT AT > REGION_TEXT_LOAD
     143        .gnu.version_d : {
     144                *(.gnu.version_d)
     145                . = ALIGN (bsp_section_align);
     146        }
     147        > REGION_TEXT AT > REGION_TEXT_LOAD
     148        .gnu.version_r : {
     149                *(.gnu.version_r)
     150                . = ALIGN (bsp_section_align);
     151        } > REGION_TEXT AT > REGION_TEXT_LOAD
     152        .rel.dyn : {
     153                *(.rel.init)
     154                *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
     155                *(.rel.fini)
     156                *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
     157                *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*)
     158                *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
     159                *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
     160                *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
     161                *(.rel.ctors)
     162                *(.rel.dtors)
     163                *(.rel.got)
     164                *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
     165                PROVIDE_HIDDEN (__rel_iplt_start = .);
     166                *(.rel.iplt)
     167                PROVIDE_HIDDEN (__rel_iplt_end = .);
     168                PROVIDE_HIDDEN (__rela_iplt_start = .);
     169                PROVIDE_HIDDEN (__rela_iplt_end = .);
     170                . = ALIGN (bsp_section_align);
     171        } > REGION_TEXT AT > REGION_TEXT_LOAD
     172        .rela.dyn : {
     173                *(.rela.init)
     174                *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
     175                *(.rela.fini)
     176                *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
     177                *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
     178                *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
     179                *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
     180                *(.rela.ctors)
     181                *(.rela.dtors)
     182                *(.rela.got)
     183                *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
     184                PROVIDE_HIDDEN (__rel_iplt_start = .);
     185                PROVIDE_HIDDEN (__rel_iplt_end = .);
     186                PROVIDE_HIDDEN (__rela_iplt_start = .);
     187                *(.rela.iplt)
     188                PROVIDE_HIDDEN (__rela_iplt_end = .);
     189                . = ALIGN (bsp_section_align);
     190        } > REGION_TEXT AT > REGION_TEXT_LOAD
     191        .rel.plt : {
     192                *(.rel.plt)
     193                . = ALIGN (bsp_section_align);
     194        } > REGION_TEXT AT > REGION_TEXT_LOAD
     195        .rela.plt : {
     196                *(.rela.plt)
     197                . = ALIGN (bsp_section_align);
     198        } > REGION_TEXT AT > REGION_TEXT_LOAD
     199        .init : {
     200                KEEP (*(.init))
     201                . = ALIGN (bsp_section_align);
     202        } > REGION_TEXT AT > REGION_TEXT_LOAD
     203        .fini : {
     204                KEEP (*(.fini))
     205                . = ALIGN (bsp_section_align);
     206        } > REGION_TEXT AT > REGION_TEXT_LOAD
     207        .plt : {
     208                *(.plt)
     209                . = ALIGN (bsp_section_align);
     210        } > REGION_TEXT AT > REGION_TEXT_LOAD
     211        .iplt : {
     212                *(.iplt)
     213                . = ALIGN (bsp_section_align);
     214        } > REGION_TEXT AT > REGION_TEXT_LOAD
    146215        .text : {
    147                 /*
    148                  * BSP: Begin of text section
    149                  */
    150                 bsp_section_text_begin = .;
    151 
    152                 /*
    153                  * BSP: Moved into .text from .init
    154                  */
    155                 KEEP (*(.init))
    156 
     216                *(.text.unlikely .text.*_unlikely)
    157217                *(.text .stub .text.* .gnu.linkonce.t.*)
    158                 KEEP (*(.text.*personality*))
    159218                /* .gnu.warning sections are handled specially by elf32.em.  */
    160219                *(.gnu.warning)
    161 
    162                 /*
    163                  * BSP: Magic ARM stuff
    164                  */
    165                 *(.ARM.*)
    166                 *(.glue_7)
    167                 *(.glue_7t)
    168                 *(.vfp11_veneer)
    169                
    170                 /*
    171                  * BSP: Special FreeBSD sysctl sections
    172                  */
    173                 . = ALIGN (16);
    174                 __start_set_sysctl_set = .;
    175                 *(set_sysctl_*);
    176                 __stop_set_sysctl_set = ABSOLUTE(.);
    177                 *(set_domain_*);
    178                 *(set_pseudo_*);
    179 
    180                 /*
    181                  * BSP: Moved into .text from .*
    182                  */
    183                 *(.eh_frame_hdr)
    184 
    185                 /*
    186                  * BSP: Required by cpukit/score/src/threadhandler.c
    187                  */
    188                 PROVIDE (_fini = .);
    189 
    190                 /*
    191                  * BSP: Moved into .text from .fini
    192                  */
    193                 KEEP (*(.fini))
    194 
    195                 . = ALIGN (bsp_section_text_end_align);
    196 
    197                 /*
    198                  * BSP: End of text section
    199                  */
     220                *(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx)
     221                . = ALIGN (bsp_section_align);
    200222                bsp_section_text_end = .;
    201223        } > REGION_TEXT AT > REGION_TEXT_LOAD
    202 
    203224        bsp_section_text_size = bsp_section_text_end - bsp_section_text_begin;
    204 
    205         bsp_section_text_load_begin = LOADADDR (.text);
    206 
    207         .rodata : {
    208                 /*
    209                  * BSP: Begin of rodata section
    210                  */
     225        bsp_section_text_load_begin = LOADADDR (.interp);
     226        bsp_section_text_load_end = bsp_section_text_load_begin + bsp_section_text_size;
     227
     228        .rodata1 : {
    211229                bsp_section_rodata_begin = .;
    212 
    213                 __start_set_modmetadata_set = .;
    214                 *(set_modmetadata_set);
    215                 __stop_set_modmetadata_set = .;
    216 
    217                 /*
    218                  * BSP: Moved into .rodata from .*
    219                  */
    220                 *(.rodata .rodata.* .gnu.linkonce.r.*)
    221230                *(.rodata1)
    222 
    223                 . = ALIGN (bsp_section_rodata_end_align);
    224 
    225                 /*
    226                  * BSP: End of rodata section
    227                  */
    228                 bsp_section_rodata_end = .;
    229         } > REGION_RODATA AT > REGION_RODATA_LOAD
    230 
    231         bsp_section_rodata_size = bsp_section_rodata_end - bsp_section_rodata_begin;
    232 
    233         bsp_section_rodata_load_begin = LOADADDR (.rodata);
    234 
    235         .robarrier : {
    236                 . = ALIGN (bsp_section_robarrier_align);
    237         } > REGION_RODATA
    238 
    239         .data : {
    240                 /*
    241                  * BSP: Begin of data section
    242                  */
    243                 bsp_section_data_begin = .;
    244 
    245                 /*
    246                  * BSP: Moved into .data from .ctors
    247                  */
     231                . = ALIGN (bsp_section_align);
     232        } > REGION_RODATA AT > REGION_RODATA_LOAD
     233        .ARM.extab : {
     234                *(.ARM.extab* .gnu.linkonce.armextab.*)
     235                . = ALIGN (bsp_section_align);
     236        } > REGION_RODATA AT > REGION_RODATA_LOAD
     237        .ARM.exidx : {
     238                __exidx_start = .;
     239                *(.ARM.exidx* .gnu.linkonce.armexidx.*)
     240                __exidx_end = .;
     241                . = ALIGN (bsp_section_align);
     242        } > REGION_RODATA AT > REGION_RODATA_LOAD
     243        .eh_frame : {
     244                KEEP (*(.eh_frame))
     245                . = ALIGN (bsp_section_align);
     246        } > REGION_RODATA AT > REGION_RODATA_LOAD
     247        .gcc_except_table : {
     248                *(.gcc_except_table .gcc_except_table.*)
     249                . = ALIGN (bsp_section_align);
     250        } > REGION_RODATA AT > REGION_RODATA_LOAD
     251        .preinit_array : {
     252                PROVIDE_HIDDEN (__preinit_array_start = .);
     253                KEEP (*(.preinit_array))
     254                PROVIDE_HIDDEN (__preinit_array_end = .);
     255                . = ALIGN (bsp_section_align);
     256        } > REGION_RODATA AT > REGION_RODATA_LOAD
     257        .init_array : {
     258                PROVIDE_HIDDEN (__init_array_start = .);
     259                KEEP (*(SORT(.init_array.*)))
     260                KEEP (*(.init_array))
     261                PROVIDE_HIDDEN (__init_array_end = .);
     262                . = ALIGN (bsp_section_align);
     263        } > REGION_RODATA AT > REGION_RODATA_LOAD
     264        .fini_array : {
     265                PROVIDE_HIDDEN (__fini_array_start = .);
     266                KEEP (*(.fini_array))
     267                KEEP (*(SORT(.fini_array.*)))
     268                PROVIDE_HIDDEN (__fini_array_end = .);
     269                . = ALIGN (bsp_section_align);
     270        } > REGION_RODATA AT > REGION_RODATA_LOAD
     271        .ctors : {
    248272                /* gcc uses crtbegin.o to find the start of
    249273                   the constructors, so we make sure it is
     
    264288                KEEP (*(SORT(.ctors.*)))
    265289                KEEP (*(.ctors))
    266 
    267                 /*
    268                  * BSP: Moved into .data from .dtors
    269                  */
     290                . = ALIGN (bsp_section_align);
     291        } > REGION_RODATA AT > REGION_RODATA_LOAD
     292        .dtors : {
    270293                KEEP (*crtbegin.o(.dtors))
    271294                KEEP (*crtbegin?.o(.dtors))
     
    273296                KEEP (*(SORT(.dtors.*)))
    274297                KEEP (*(.dtors))
    275 
    276                 /*
    277                  * BSP: Moved into .data from .*
    278                  */
     298                . = ALIGN (bsp_section_align);
     299        } > REGION_RODATA AT > REGION_RODATA_LOAD
     300        .data.rel.ro : {
     301                *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*)
     302                *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*)
     303                . = ALIGN (bsp_section_align);
     304        } > REGION_RODATA AT > REGION_RODATA_LOAD
     305        .jcr : {
     306                KEEP (*(.jcr))
     307                . = ALIGN (bsp_section_align);
     308        } > REGION_RODATA AT > REGION_RODATA_LOAD
     309        .dynamic : {
     310                *(.dynamic)
     311                . = ALIGN (bsp_section_align);
     312        } > REGION_RODATA AT > REGION_RODATA_LOAD
     313        .got : {
     314                *(.got.plt) *(.igot.plt) *(.got) *(.igot)
     315                . = ALIGN (bsp_section_align);
     316        } > REGION_RODATA AT > REGION_RODATA_LOAD
     317        .rodata : {
     318                /* Special FreeBSD sysctl sections */
     319                . = ALIGN (16);
     320                __start_set_sysctl_set = .;
     321                *(set_sysctl_*);
     322                __stop_set_sysctl_set = ABSOLUTE(.);
     323                *(set_domain_*);
     324                *(set_pseudo_*);
     325                _bsd__start_set_sysinit_set = .;
     326                *(_bsd_set_sysinit_set);
     327                _bsd__stop_set_sysinit_set = .;
     328                _bsd__start_set_modmetadata_set = .;
     329                *(_bsd_set_modmetadata_set);
     330                _bsd__stop_set_modmetadata_set = .;
     331                _bsd__start_set_sysctl_set = .;
     332                *(_bsd_set_sysctl_set);
     333                _bsd__stop_set_sysctl_set = .;
     334
     335                *(.rodata .rodata.* .gnu.linkonce.r.*)
     336                . = ALIGN (bsp_section_align);
     337                bsp_section_rodata_end = .;
     338        } > REGION_RODATA AT > REGION_RODATA_LOAD
     339        bsp_section_rodata_size = bsp_section_rodata_end - bsp_section_rodata_begin;
     340        bsp_section_rodata_load_begin = LOADADDR (.rodata1);
     341        bsp_section_rodata_load_end = bsp_section_rodata_load_begin + bsp_section_rodata_size;
     342
     343        .robarrier : {
     344                . = ALIGN (bsp_section_robarrier_align);
     345        } > REGION_RODATA
     346
     347        .data1 : {
     348                bsp_section_data_begin = .;
    279349                *(.data1)
    280                 KEEP (*(.eh_frame))
    281                 *(.gcc_except_table .gcc_except_table.*)
    282                 KEEP (*(.jcr))
    283 
     350                . = ALIGN (bsp_section_align);
     351        } > REGION_DATA AT > REGION_DATA_LOAD
     352        .data : {
    284353                *(.data .data.* .gnu.linkonce.d.*)
    285                 KEEP (*(.gnu.linkonce.d.*personality*))
    286354                SORT(CONSTRUCTORS)
    287 
    288                 . = ALIGN (bsp_section_data_end_align);
    289 
    290                 /*
    291                  * BSP: End of data section
    292                  */
     355                . = ALIGN (bsp_section_align);
    293356                bsp_section_data_end = .;
    294357        } > REGION_DATA AT > REGION_DATA_LOAD
    295 
    296358        bsp_section_data_size = bsp_section_data_end - bsp_section_data_begin;
    297 
    298         bsp_section_data_load_begin = LOADADDR (.data);
    299 
    300         .fast : {
    301                 bsp_section_fast_begin = .;
    302 
    303                 *(.bsp_fast)
    304 
    305                 . = ALIGN (bsp_section_fast_end_align);
    306 
    307                 bsp_section_fast_end = .;
     359        bsp_section_data_load_begin = LOADADDR (.data1);
     360        bsp_section_data_load_end = bsp_section_data_load_begin + bsp_section_data_size;
     361
     362        .fast_text : {
     363                bsp_section_fast_text_begin = .;
     364                *(.bsp_fast_text)
     365                . = ALIGN (bsp_section_align);
     366                bsp_section_fast_text_end = .;
    308367        } > REGION_FAST AT > REGION_FAST_LOAD
    309 
    310         bsp_section_fast_size = bsp_section_fast_end - bsp_section_fast_begin;
    311 
    312         bsp_section_fast_load_begin = LOADADDR (.fast);
     368        bsp_section_fast_text_size = bsp_section_fast_text_end - bsp_section_fast_text_begin;
     369        bsp_section_fast_text_load_begin = LOADADDR (.fast_text);
     370        bsp_section_fast_text_load_end = bsp_section_fast_text_load_begin + bsp_section_fast_text_size;
     371
     372        .fast_data : {
     373                bsp_section_fast_data_begin = .;
     374                *(.bsp_fast_data)
     375                . = ALIGN (bsp_section_align);
     376                bsp_section_fast_data_end = .;
     377        } > REGION_FAST AT > REGION_FAST_LOAD
     378        bsp_section_fast_data_size = bsp_section_fast_data_end - bsp_section_fast_data_begin;
     379        bsp_section_fast_data_load_begin = LOADADDR (.fast_data);
     380        bsp_section_fast_data_load_end = bsp_section_fast_data_load_begin + bsp_section_fast_data_size;
    313381
    314382        .bss : {
    315                 /*
    316                  * BSP: Begin of bss section
    317                  */
    318383                bsp_section_bss_begin = .;
    319 
    320                 *(COMMON)
    321384                *(.dynbss)
    322385                *(.bss .bss.* .gnu.linkonce.b.*)
    323 
    324                 . = ALIGN (bsp_section_bss_end_align);
    325 
    326                 /*
    327                  * BSP: End of bss section
    328                  */
     386                *(COMMON)
     387                . = ALIGN (bsp_section_align);
    329388                bsp_section_bss_end = .;
    330389        } > REGION_BSS AT > REGION_BSS
    331 
    332390        bsp_section_bss_size = bsp_section_bss_end - bsp_section_bss_begin;
    333391
    334392        .work : {
    335393                /*
    336                  * BSP: Begin of work section.  The work section will occupy
    337                  * the remaining REGION_WORK region and contains the RTEMS work
    338                  * space and heap.
     394                 * The work section will occupy the remaining REGION_WORK region and
     395                 * contains the RTEMS work space and heap.
    339396                 */
    340397                bsp_section_work_begin = .;
    341 
    342398                . += ORIGIN (REGION_WORK) + LENGTH (REGION_WORK) - ABSOLUTE (.);
    343 
    344                 /*
    345                  * BSP: End of work section
    346                  */
    347399                bsp_section_work_end = .;
    348400        } > REGION_WORK AT > REGION_WORK
    349 
    350401        bsp_section_work_size = bsp_section_work_end - bsp_section_work_begin;
    351402
    352403        .stack : {
    353404                /*
    354                  * BSP: Begin of stack section.  The stack section will occupy
    355                  * the remaining REGION_STACK region and may contain the task
    356                  * stacks.  Depending on the region distribution this section
    357                  * may be of zero size.
     405                 * The stack section will occupy the remaining REGION_STACK region and may
     406                 * contain the task stacks.  Depending on the region distribution this
     407                 * section may be of zero size.
    358408                 */
    359409                bsp_section_stack_begin = .;
    360 
    361410                . += ORIGIN (REGION_STACK) + LENGTH (REGION_STACK) - ABSOLUTE (.);
    362 
    363                 /*
    364                  * BSP: End of stack section
    365                  */
    366411                bsp_section_stack_end = .;
    367412        } > REGION_STACK AT > REGION_STACK
    368 
    369413        bsp_section_stack_size = bsp_section_stack_end - bsp_section_stack_begin;
    370414
    371         /*
    372          * BSP: External symbols (FIXME)
    373          */
     415        /* FIXME */
    374416        RamBase = ORIGIN (REGION_WORK);
    375417        RamSize = LENGTH (REGION_WORK);
    376418        WorkAreaBase = bsp_section_work_begin;
    377419        HeapSize = 0;
    378        
     420
    379421        /* Stabs debugging sections.  */
    380422        .stab          0 : { *(.stab) }
     
    413455        .debug_pubtypes 0 : { *(.debug_pubtypes) }
    414456        .debug_ranges   0 : { *(.debug_ranges) }
    415         .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
    416 
    417         /DISCARD/ : {
    418                 *(.note.GNU-stack) *(.gnu_debuglink)
    419         }
    420 
    421         /*
    422          * BSP: Catch all unknown sections
    423          */
    424         .nirvana : {
    425                 *(*)
    426         } > NIRVANA
     457        .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }
     458        .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
     459        /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }
     460
     461        /* Catch all unknown sections */
     462        .nirvana : { *(*) } > NIRVANA
    427463}
Note: See TracChangeset for help on using the changeset viewer.