bsps/powerpc: Use ALIGN_WITH_INPUT

This requires at least Binutils 2.24.
This commit is contained in:
Sebastian Huber
2013-07-09 09:53:08 +02:00
parent fb664a21c2
commit 43c6268509
5 changed files with 101 additions and 168 deletions

View File

@@ -88,12 +88,6 @@ _start:
LWI r5, bsp_section_rodata_size LWI r5, bsp_section_rodata_size
bl copy bl copy
/* Copy small read-only data */
LWI r3, bsp_section_sdata2_begin
LWI r4, bsp_section_sdata2_load_begin
LWI r5, bsp_section_sdata2_size
bl copy
/* Copy fast data */ /* Copy fast data */
LWI r3, bsp_section_fast_data_begin LWI r3, bsp_section_fast_data_begin
LWI r4, bsp_section_fast_data_load_begin LWI r4, bsp_section_fast_data_load_begin
@@ -106,12 +100,6 @@ _start:
LWI r5, bsp_section_data_size LWI r5, bsp_section_data_size
bl copy bl copy
/* Copy small data */
LWI r3, bsp_section_sdata_begin
LWI r4, bsp_section_sdata_load_begin
LWI r5, bsp_section_sdata_size
bl copy
/* NULL pointer access protection (only core 0 has to do this) */ /* NULL pointer access protection (only core 0 has to do this) */
mfspr r3, BOOKE_PIR mfspr r3, BOOKE_PIR
cmpwi r3, 0 cmpwi r3, 0

View File

@@ -84,14 +84,10 @@ static const entry DATA config [] = {
ENTRY_X(bsp_section_text_begin, bsp_section_text_size), ENTRY_X(bsp_section_text_begin, bsp_section_text_size),
ENTRY_R(bsp_section_rodata_load_begin, bsp_section_rodata_size), ENTRY_R(bsp_section_rodata_load_begin, bsp_section_rodata_size),
ENTRY_R(bsp_section_rodata_begin, bsp_section_rodata_size), ENTRY_R(bsp_section_rodata_begin, bsp_section_rodata_size),
ENTRY_R(bsp_section_sdata2_load_begin, bsp_section_sdata2_size),
ENTRY_R(bsp_section_sdata2_begin, bsp_section_sdata2_size),
ENTRY_R(bsp_section_fast_data_load_begin, bsp_section_fast_data_size), ENTRY_R(bsp_section_fast_data_load_begin, bsp_section_fast_data_size),
ENTRY_RW(bsp_section_fast_data_begin, bsp_section_fast_data_size), ENTRY_RW(bsp_section_fast_data_begin, bsp_section_fast_data_size),
ENTRY_R(bsp_section_data_load_begin, bsp_section_data_size), ENTRY_R(bsp_section_data_load_begin, bsp_section_data_size),
ENTRY_RW(bsp_section_data_begin, bsp_section_data_size), ENTRY_RW(bsp_section_data_begin, bsp_section_data_size),
ENTRY_R(bsp_section_sdata_load_begin, bsp_section_sdata_size),
ENTRY_RW(bsp_section_sdata_begin, bsp_section_sdata_size),
ENTRY_RW(bsp_section_sbss_begin, bsp_section_sbss_size), ENTRY_RW(bsp_section_sbss_begin, bsp_section_sbss_size),
ENTRY_RW(bsp_section_bss_begin, bsp_section_bss_size), ENTRY_RW(bsp_section_bss_begin, bsp_section_bss_size),
ENTRY_RW(bsp_section_rwextra_begin, bsp_section_rwextra_size), ENTRY_RW(bsp_section_rwextra_begin, bsp_section_rwextra_size),

View File

@@ -7,10 +7,10 @@
*/ */
/* /*
* Copyright (c) 2010-2012 embedded brains GmbH. All rights reserved. * Copyright (c) 2010-2013 embedded brains GmbH. All rights reserved.
* *
* embedded brains GmbH * embedded brains GmbH
* Obere Lagerstr. 30 * Donrierstr. 4
* 82178 Puchheim * 82178 Puchheim
* Germany * Germany
* <rtems@embedded-brains.de> * <rtems@embedded-brains.de>
@@ -61,12 +61,6 @@ 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_rodata_load_end)
LINKER_SYMBOL(bsp_section_sdata2_begin)
LINKER_SYMBOL(bsp_section_sdata2_end)
LINKER_SYMBOL(bsp_section_sdata2_size)
LINKER_SYMBOL(bsp_section_sdata2_load_begin)
LINKER_SYMBOL(bsp_section_sdata2_load_end)
LINKER_SYMBOL(bsp_section_fast_data_begin) LINKER_SYMBOL(bsp_section_fast_data_begin)
LINKER_SYMBOL(bsp_section_fast_data_end) LINKER_SYMBOL(bsp_section_fast_data_end)
LINKER_SYMBOL(bsp_section_fast_data_size) LINKER_SYMBOL(bsp_section_fast_data_size)
@@ -79,12 +73,6 @@ 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_data_load_end)
LINKER_SYMBOL(bsp_section_sdata_begin)
LINKER_SYMBOL(bsp_section_sdata_end)
LINKER_SYMBOL(bsp_section_sdata_size)
LINKER_SYMBOL(bsp_section_sdata_load_begin)
LINKER_SYMBOL(bsp_section_sdata_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)
LINKER_SYMBOL(bsp_section_bss_size) LINKER_SYMBOL(bsp_section_bss_size)

View File

@@ -39,7 +39,7 @@ MEMORY {
} }
SECTIONS { SECTIONS {
.start : { .start : ALIGN_WITH_INPUT {
bsp_section_start_begin = .; bsp_section_start_begin = .;
KEEP (*(.bsp_start_text)) KEEP (*(.bsp_start_text))
KEEP (*(.bsp_start_data)) KEEP (*(.bsp_start_data))
@@ -47,35 +47,31 @@ SECTIONS {
} > 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;
.xbarrier : { .xbarrier : ALIGN_WITH_INPUT {
. = ALIGN (bsp_section_xbarrier_align); . = ALIGN (bsp_section_xbarrier_align);
} > REGION_TEXT } > REGION_TEXT
.text : ALIGN(32) { .text : ALIGN_WITH_INPUT {
bsp_section_text_begin = .; bsp_section_text_begin = .;
*(SORT(.bsp_text*)) *(SORT(.bsp_text*))
/* .text */
*(.text.unlikely .text.*_unlikely) *(.text.unlikely .text.*_unlikely)
*(.text .stub .text.* .gnu.linkonce.t.*) *(.text .stub .text.* .gnu.linkonce.t.*)
*(.gnu.warning) *(.gnu.warning)
*(.glink) *(.glink)
} > REGION_TEXT AT > REGION_TEXT_LOAD
/* .init */ .init : ALIGN_WITH_INPUT {
KEEP (*(.init)) KEEP (*(.init))
} > REGION_TEXT AT > REGION_TEXT_LOAD
/* .fini */ .fini : ALIGN_WITH_INPUT {
PROVIDE (_fini = .); PROVIDE (_fini = .);
KEEP (*(.fini)) KEEP (*(.fini))
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 (.text); bsp_section_text_load_begin = LOADADDR (.text);
bsp_section_text_load_end = bsp_section_text_load_begin + bsp_section_text_size; bsp_section_text_load_end = bsp_section_text_load_begin + bsp_section_text_size;
.fast_text : ALIGN(32) { .fast_text : ALIGN_WITH_INPUT {
bsp_section_fast_text_begin = .; bsp_section_fast_text_begin = .;
*(.bsp_fast_text) *(.bsp_fast_text)
bsp_section_fast_text_end = .; bsp_section_fast_text_end = .;
@@ -84,122 +80,126 @@ SECTIONS {
bsp_section_fast_text_load_begin = LOADADDR (.fast_text); 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_text_load_end = bsp_section_fast_text_load_begin + bsp_section_fast_text_size;
.robarrier : { .robarrier : ALIGN_WITH_INPUT {
. = ALIGN (bsp_section_robarrier_align); . = ALIGN (bsp_section_robarrier_align);
} > REGION_RODATA } > REGION_RODATA
.rodata : ALIGN(32) { .rodata : ALIGN_WITH_INPUT {
bsp_section_rodata_begin = .; bsp_section_rodata_begin = .;
*(SORT(.bsp_rodata*)) *(SORT(.bsp_rodata*))
/* .rodata */
*(.rodata .rodata.* .gnu.linkonce.r.*) *(.rodata .rodata.* .gnu.linkonce.r.*)
} > REGION_RODATA AT > REGION_RODATA_LOAD
/* .rodata1 */ .rodata1 : ALIGN_WITH_INPUT {
*(.rodata1) *(.rodata1)
} > REGION_RODATA AT > REGION_RODATA_LOAD
/* .eh_frame_hdr */ .sdata2 : ALIGN_WITH_INPUT {
PROVIDE (_SDA2_BASE_ = 32768);
*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
} > REGION_RODATA AT > REGION_RODATA_LOAD
.sbss2 : ALIGN_WITH_INPUT {
*(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)
} > REGION_RODATA AT > REGION_RODATA_LOAD
.eh_frame_hdr : ALIGN_WITH_INPUT {
*(.eh_frame_hdr) *(.eh_frame_hdr)
} > REGION_RODATA AT > REGION_RODATA_LOAD
/* .eh_frame */ .eh_frame : ALIGN_WITH_INPUT {
KEEP (*(.eh_frame)) KEEP (*(.eh_frame))
} > REGION_RODATA AT > REGION_RODATA_LOAD
/* .gcc_except_table */ .gcc_except_table : ALIGN_WITH_INPUT {
*(.gcc_except_table .gcc_except_table.*) *(.gcc_except_table .gcc_except_table.*)
} > REGION_RODATA AT > REGION_RODATA_LOAD
/* .tdata */ .tdata : ALIGN_WITH_INPUT {
*(.tdata .tdata.* .gnu.linkonce.td.*) *(.tdata .tdata.* .gnu.linkonce.td.*)
} > REGION_RODATA AT > REGION_RODATA_LOAD
/* .tbss */ .tbss : ALIGN_WITH_INPUT {
*(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
} > REGION_RODATA AT > REGION_RODATA_LOAD
/* .preinit_array */ .preinit_array : ALIGN_WITH_INPUT {
PROVIDE_HIDDEN (__preinit_array_start = .); PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP (*(.preinit_array)) KEEP (*(.preinit_array))
PROVIDE_HIDDEN (__preinit_array_end = .); PROVIDE_HIDDEN (__preinit_array_end = .);
} > REGION_RODATA AT > REGION_RODATA_LOAD
/* .init_array */ .init_array : ALIGN_WITH_INPUT {
PROVIDE_HIDDEN (__init_array_start = .); PROVIDE_HIDDEN (__init_array_start = .);
KEEP (*(SORT(.init_array.*))) KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array)) KEEP (*(.init_array))
PROVIDE_HIDDEN (__init_array_end = .); PROVIDE_HIDDEN (__init_array_end = .);
} > REGION_RODATA AT > REGION_RODATA_LOAD
/* .fini_array */ .fini_array : ALIGN_WITH_INPUT {
PROVIDE_HIDDEN (__fini_array_start = .); PROVIDE_HIDDEN (__fini_array_start = .);
KEEP (*(SORT(.fini_array.*))) KEEP (*(SORT(.fini_array.*)))
KEEP (*(.fini_array)) KEEP (*(.fini_array))
PROVIDE_HIDDEN (__fini_array_end = .); PROVIDE_HIDDEN (__fini_array_end = .);
} > REGION_RODATA AT > REGION_RODATA_LOAD
/* .ctors */ .ctors : ALIGN_WITH_INPUT {
KEEP (*crtbegin.o(.ctors)) KEEP (*crtbegin.o(.ctors))
KEEP (*crtbegin?.o(.ctors)) KEEP (*crtbegin?.o(.ctors))
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))
} > REGION_RODATA AT > REGION_RODATA_LOAD
/* .dtors */ .dtors : ALIGN_WITH_INPUT {
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))
} > REGION_RODATA AT > REGION_RODATA_LOAD
/* .jcr */ .jcr : ALIGN_WITH_INPUT {
KEEP (*(.jcr)) KEEP (*(.jcr))
} > REGION_RODATA AT > REGION_RODATA_LOAD
/* .data.rel.ro */ .data.rel.ro : ALIGN_WITH_INPUT {
*(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*)
} > REGION_RODATA AT > REGION_RODATA_LOAD
/* .fixpup */ .fixup : ALIGN_WITH_INPUT {
*(.fixup) *(.fixup)
} > REGION_RODATA AT > REGION_RODATA_LOAD
/* .dynamic */ .dynamic : ALIGN_WITH_INPUT {
*(.dynamic) *(.dynamic)
} > REGION_RODATA AT > REGION_RODATA_LOAD
/* .got1 */ .got1 : ALIGN_WITH_INPUT {
*(.got1) *(.got1)
} > REGION_RODATA AT > REGION_RODATA_LOAD
/* .got2 */ .got2 : ALIGN_WITH_INPUT {
*(.got2) *(.got2)
} > REGION_RODATA AT > REGION_RODATA_LOAD
/* .got */ .got : ALIGN_WITH_INPUT {
*(.got) *(.got)
} > REGION_RODATA AT > REGION_RODATA_LOAD
/* .plt */ .plt : ALIGN_WITH_INPUT {
*(.plt) *(.plt)
} > REGION_RODATA AT > REGION_RODATA_LOAD
/* .iptl */ .iplt : ALIGN_WITH_INPUT {
*(.iplt) *(.iplt)
} > REGION_RODATA AT > REGION_RODATA_LOAD
/* .interp */ .interp : ALIGN_WITH_INPUT {
*(.interp) *(.interp)
} > REGION_RODATA AT > REGION_RODATA_LOAD
/* .note.gnu.build-id */ .note.gnu.build-id : ALIGN_WITH_INPUT {
*(.note.gnu.build-id) *(.note.gnu.build-id)
} > REGION_RODATA AT > REGION_RODATA_LOAD
/* .hash */ .hash : ALIGN_WITH_INPUT {
*(.hash) *(.hash)
} > REGION_RODATA AT > REGION_RODATA_LOAD
/* .gnu.hash */ .gnu.hash : ALIGN_WITH_INPUT {
*(.gnu.hash) *(.gnu.hash)
} > REGION_RODATA AT > REGION_RODATA_LOAD
/* .dynsym */ .dynsym : ALIGN_WITH_INPUT {
*(.dynsym) *(.dynsym)
} > REGION_RODATA AT > REGION_RODATA_LOAD
/* .dynstr */ .dynstr : ALIGN_WITH_INPUT {
*(.dynstr) *(.dynstr)
} > REGION_RODATA AT > REGION_RODATA_LOAD
/* .gnu.version */ .gnu.version : ALIGN_WITH_INPUT {
*(.gnu.version) *(.gnu.version)
} > REGION_RODATA AT > REGION_RODATA_LOAD
/* .gnu.version_d */ .gnu.version_d : ALIGN_WITH_INPUT {
*(.gnu.version_d) *(.gnu.version_d)
} > REGION_RODATA AT > REGION_RODATA_LOAD
/* .gnu.version_r */ .gnu.version_r : ALIGN_WITH_INPUT {
*(.gnu.version_r) *(.gnu.version_r)
} > REGION_RODATA AT > REGION_RODATA_LOAD
/* .rela.dyn */ .rela.dyn : ALIGN_WITH_INPUT {
*(.rela.init) *(.rela.init)
*(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
*(.rela.fini) *(.rela.fini)
@@ -222,10 +222,11 @@ SECTIONS {
PROVIDE_HIDDEN (__rela_iplt_start = .); PROVIDE_HIDDEN (__rela_iplt_start = .);
*(.rela.iplt) *(.rela.iplt)
PROVIDE_HIDDEN (__rela_iplt_end = .); PROVIDE_HIDDEN (__rela_iplt_end = .);
} > REGION_RODATA AT > REGION_RODATA_LOAD
/* .rela.plt */ .rela.plt : ALIGN_WITH_INPUT {
*(.rela.plt) *(.rela.plt)
} > REGION_RODATA AT > REGION_RODATA_LOAD
.robsdsets : ALIGN_WITH_INPUT {
/* Special FreeBSD linker set sections */ /* Special FreeBSD linker set sections */
__start_set_sysctl_set = .; __start_set_sysctl_set = .;
*(set_sysctl_*); *(set_sysctl_*);
@@ -245,27 +246,11 @@ SECTIONS {
bsp_section_rodata_load_begin = LOADADDR (.rodata); bsp_section_rodata_load_begin = LOADADDR (.rodata);
bsp_section_rodata_load_end = bsp_section_rodata_load_begin + bsp_section_rodata_size; bsp_section_rodata_load_end = bsp_section_rodata_load_begin + bsp_section_rodata_size;
.sdata2 : ALIGN(32) { .rwbarrier : ALIGN_WITH_INPUT {
bsp_section_sdata2_begin = .;
/* .sdata2 */
PROVIDE (_SDA2_BASE_ = 32768);
*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
/* .sbss2 */
*(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)
bsp_section_sdata2_end = .;
} > REGION_RODATA AT > REGION_RODATA_LOAD
bsp_section_sdata2_size = bsp_section_sdata2_end - bsp_section_sdata2_begin;
bsp_section_sdata2_load_begin = LOADADDR (.sdata2);
bsp_section_sdata2_load_end = bsp_section_sdata2_load_begin + bsp_section_sdata2_size;
.rwbarrier : {
. = ALIGN (bsp_section_rwbarrier_align); . = ALIGN (bsp_section_rwbarrier_align);
} > REGION_DATA } > REGION_DATA
.fast_data : ALIGN(32) { .fast_data : ALIGN_WITH_INPUT {
bsp_section_fast_data_begin = .; bsp_section_fast_data_begin = .;
*(SORT(.bsp_fast_data*)) *(SORT(.bsp_fast_data*))
bsp_section_fast_data_end = .; bsp_section_fast_data_end = .;
@@ -274,43 +259,31 @@ SECTIONS {
bsp_section_fast_data_load_begin = LOADADDR (.fast_data); 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; bsp_section_fast_data_load_end = bsp_section_fast_data_load_begin + bsp_section_fast_data_size;
.data : ALIGN(32) { .data : ALIGN_WITH_INPUT {
bsp_section_data_begin = .; bsp_section_data_begin = .;
*(SORT(.bsp_data*)) *(SORT(.bsp_data*))
/* .data */
*(.data .data.* .gnu.linkonce.d.*) *(.data .data.* .gnu.linkonce.d.*)
SORT(CONSTRUCTORS) SORT(CONSTRUCTORS)
} > REGION_DATA AT > REGION_DATA_LOAD
/* .data1 */ .data1 : ALIGN_WITH_INPUT {
*(.data1) *(.data1)
} > REGION_DATA AT > REGION_DATA_LOAD
.rwbsdsets : ALIGN_WITH_INPUT {
/* Special FreeBSD linker set sections */ /* Special FreeBSD linker set sections */
_bsd__start_set_sysinit_set = .; _bsd__start_set_sysinit_set = .;
*(_bsd_set_sysinit_set); *(_bsd_set_sysinit_set);
_bsd__stop_set_sysinit_set = .; _bsd__stop_set_sysinit_set = .;
} > REGION_DATA AT > REGION_DATA_LOAD
.sdata : ALIGN_WITH_INPUT {
PROVIDE (_SDA_BASE_ = 32768);
*(.sdata .sdata.* .gnu.linkonce.s.*)
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 (.data); bsp_section_data_load_begin = LOADADDR (.data);
bsp_section_data_load_end = bsp_section_data_load_begin + bsp_section_data_size; bsp_section_data_load_end = bsp_section_data_load_begin + bsp_section_data_size;
.sdata : ALIGN(32) { .sbss : ALIGN_WITH_INPUT {
bsp_section_sdata_begin = .;
/* .sdata */
PROVIDE (_SDA_BASE_ = 32768);
*(.sdata .sdata.* .gnu.linkonce.s.*)
bsp_section_sdata_end = .;
} > REGION_DATA AT > REGION_DATA_LOAD
bsp_section_sdata_size = bsp_section_sdata_end - bsp_section_sdata_begin;
bsp_section_sdata_load_begin = LOADADDR (.sdata);
bsp_section_sdata_load_end = bsp_section_sdata_load_begin + bsp_section_sdata_size;
.sbss : {
bsp_section_sbss_begin = .; bsp_section_sbss_begin = .;
*(.dynsbss) *(.dynsbss)
*(.sbss .sbss.* .gnu.linkonce.sb.*) *(.sbss .sbss.* .gnu.linkonce.sb.*)
@@ -319,7 +292,7 @@ SECTIONS {
} > REGION_DATA AT > REGION_DATA } > REGION_DATA AT > REGION_DATA
bsp_section_sbss_size = bsp_section_sbss_end - bsp_section_sbss_begin; bsp_section_sbss_size = bsp_section_sbss_end - bsp_section_sbss_begin;
.bss : { .bss : ALIGN_WITH_INPUT {
bsp_section_bss_begin = .; bsp_section_bss_begin = .;
*(.dynbss) *(.dynbss)
*(.bss .bss.* .gnu.linkonce.b.*) *(.bss .bss.* .gnu.linkonce.b.*)
@@ -328,14 +301,14 @@ SECTIONS {
} > 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;
.rwextra : { .rwextra : ALIGN_WITH_INPUT {
bsp_section_rwextra_begin = .; bsp_section_rwextra_begin = .;
*(.bsp_rwextra) *(.bsp_rwextra)
bsp_section_rwextra_end = .; bsp_section_rwextra_end = .;
} > REGION_RWEXTRA AT > REGION_RWEXTRA } > REGION_RWEXTRA AT > REGION_RWEXTRA
bsp_section_rwextra_size = bsp_section_rwextra_end - bsp_section_rwextra_begin; bsp_section_rwextra_size = bsp_section_rwextra_end - bsp_section_rwextra_begin;
.work : { .work : ALIGN_WITH_INPUT {
/* /*
* The work section will occupy the remaining REGION_WORK region and * The work section will occupy the remaining REGION_WORK region and
* contains the RTEMS work space and heap. * contains the RTEMS work space and heap.
@@ -346,7 +319,7 @@ SECTIONS {
} > 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 : ALIGN_WITH_INPUT {
/* /*
* The stack section will occupy the remaining REGION_STACK region and may * The stack section will occupy the remaining REGION_STACK region and may
* contain the task stacks. Depending on the region distribution this * contain the task stacks. Depending on the region distribution this
@@ -358,7 +331,7 @@ SECTIONS {
} > 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;
.nocache : { .nocache : ALIGN_WITH_INPUT {
bsp_section_nocache_begin = .; bsp_section_nocache_begin = .;
*(SORT(.bsp_nocache*)) *(SORT(.bsp_nocache*))
bsp_section_nocache_end = .; bsp_section_nocache_end = .;
@@ -367,7 +340,7 @@ SECTIONS {
bsp_section_nocache_load_begin = LOADADDR (.nocache); bsp_section_nocache_load_begin = LOADADDR (.nocache);
bsp_section_nocache_load_end = bsp_section_nocache_load_begin + bsp_section_nocache_size; bsp_section_nocache_load_end = bsp_section_nocache_load_begin + bsp_section_nocache_size;
.nvram (NOLOAD) : { .nvram (NOLOAD) : ALIGN_WITH_INPUT {
bsp_section_nvram_begin = .; bsp_section_nvram_begin = .;
*(SORT(.bsp_nvram*)) *(SORT(.bsp_nvram*))
bsp_section_nvram_end = .; bsp_section_nvram_end = .;

View File

@@ -46,12 +46,6 @@ _start:
LWI r5, bsp_section_rodata_size LWI r5, bsp_section_rodata_size
bl copy bl copy
/* Copy small read-only data */
LWI r3, bsp_section_sdata2_begin
LWI r4, bsp_section_sdata2_load_begin
LWI r5, bsp_section_sdata2_size
bl copy
/* Copy fast data */ /* Copy fast data */
LWI r3, bsp_section_fast_data_begin LWI r3, bsp_section_fast_data_begin
LWI r4, bsp_section_fast_data_load_begin LWI r4, bsp_section_fast_data_load_begin
@@ -64,12 +58,6 @@ _start:
LWI r5, bsp_section_data_size LWI r5, bsp_section_data_size
bl copy bl copy
/* Copy small data */
LWI r3, bsp_section_sdata_begin
LWI r4, bsp_section_sdata_load_begin
LWI r5, bsp_section_sdata_size
bl copy
/* Clear SBSS */ /* Clear SBSS */
LWI r3, bsp_section_sbss_begin LWI r3, bsp_section_sbss_begin
LWI r4, bsp_section_sbss_size LWI r4, bsp_section_sbss_size