mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-25 05:47:12 +00:00
2008-07-21 Till Straumann <strauman@slac.stanford.edu>
* startup/linkcmds: fixed sdata/sbss areas -- these must be contiguous for SVR4 complicant access via R13. Use kludged layout so that sbss, bss, sbss2 are all contiguous and zeroed by dlentry.S. Provide _SDA_BASE_ and _SDA2_BASE_ for loading R13 (and R2 if anyone wants to use EABI). Make sure interrupt stack is never in heap area by moving it below '_end'. Provide symbols for start + end of interrupt stack.
This commit is contained in:
@@ -1,3 +1,18 @@
|
|||||||
|
2008-07-21 Till Straumann <strauman@slac.stanford.edu>
|
||||||
|
|
||||||
|
* startup/linkcmds: fixed sdata/sbss areas -- these
|
||||||
|
must be contiguous for SVR4 complicant access via R13.
|
||||||
|
Use kludged layout so that sbss, bss, sbss2 are all
|
||||||
|
contiguous and zeroed by dlentry.S.
|
||||||
|
|
||||||
|
Provide _SDA_BASE_ and _SDA2_BASE_ for loading R13 (and
|
||||||
|
R2 if anyone wants to use EABI).
|
||||||
|
|
||||||
|
Make sure interrupt stack is never in heap area by
|
||||||
|
moving it below '_end'.
|
||||||
|
|
||||||
|
Provide symbols for start + end of interrupt stack.
|
||||||
|
|
||||||
2008-07-21 Till Straumann <strauman@slac.stanford.edu>
|
2008-07-21 Till Straumann <strauman@slac.stanford.edu>
|
||||||
|
|
||||||
* console/consolelite.c: use base address from RTEMS_XPARAMETERS_H
|
* console/consolelite.c: use base address from RTEMS_XPARAMETERS_H
|
||||||
|
|||||||
@@ -179,13 +179,6 @@ SECTIONS
|
|||||||
*(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
|
*(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
|
||||||
} >RAM
|
} >RAM
|
||||||
|
|
||||||
PROVIDE (__SDATA2_START__ = .);
|
|
||||||
.sdata2 : { *(.sdata2) *(.gnu.linkonce.s2.*) } >RAM
|
|
||||||
.sbss2 : { *(.sbss2) *(.gnu.linkonce.sb2.*) } >RAM
|
|
||||||
PROVIDE (__SBSS2_END__ = .);
|
|
||||||
|
|
||||||
.sbss2 : { *(.sbss2) } >RAM
|
|
||||||
PROVIDE (__SBSS2_END__ = .);
|
|
||||||
|
|
||||||
/* R/W Data */
|
/* R/W Data */
|
||||||
.data ( . ) :
|
.data ( . ) :
|
||||||
@@ -197,33 +190,63 @@ SECTIONS
|
|||||||
*(.data)
|
*(.data)
|
||||||
*(.data1)
|
*(.data1)
|
||||||
*(.data.* .gnu.linkonce.d.*)
|
*(.data.* .gnu.linkonce.d.*)
|
||||||
PROVIDE (__SDATA_START__ = .);
|
|
||||||
*(.sdata*)
|
|
||||||
*(.gnu.linkonce.s.*)
|
|
||||||
data.end = .;
|
data.end = .;
|
||||||
data.size = data.end - data.start;
|
data.size = data.end - data.start;
|
||||||
PROVIDE (_edata = .);
|
|
||||||
} >RAM
|
} >RAM
|
||||||
|
|
||||||
__SBSS_START__ = .;
|
/* Arrange as follows:
|
||||||
.bss :
|
* sdata
|
||||||
{
|
* sbss
|
||||||
bss.start = .;
|
* bss
|
||||||
|
* sbss2
|
||||||
|
* sdata2
|
||||||
|
* so that we have a contiguous 'bss' area
|
||||||
|
* which can be zeroed in one sweep.
|
||||||
|
* (sdata/sbss and sdata2/sbss2 must also be
|
||||||
|
* contiguous).
|
||||||
|
*/
|
||||||
|
|
||||||
|
_SDA_BASE_ = __SDATA_START__ + 0x8000;
|
||||||
|
.sdata : {
|
||||||
|
*(.sdata .sdata.*)
|
||||||
|
*(.gnu.linkonce.s.*)
|
||||||
|
} > RAM
|
||||||
|
_edata = .;
|
||||||
|
.sbss : {
|
||||||
|
*(.dynsbss)
|
||||||
|
*(.sbss .sbss.* .gnu.linkonce.sb.*)
|
||||||
|
*(.scommon)
|
||||||
|
} > RAM
|
||||||
|
.bss : {
|
||||||
|
*(.dynbss)
|
||||||
*(.bss .bss* .gnu.linkonce.b*)
|
*(.bss .bss* .gnu.linkonce.b*)
|
||||||
*(.sbss*) *(COMMON)
|
*(COMMON)
|
||||||
bss.end = ALIGN(4);
|
} >RAM
|
||||||
|
_SDA2_BASE_ = __SBSS2_START__ + 0x8000;
|
||||||
|
.sbss2 : {
|
||||||
|
*(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)
|
||||||
|
} > RAM
|
||||||
|
.sdata2 : {
|
||||||
|
*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
|
||||||
} > RAM
|
} > RAM
|
||||||
bss.size = bss.end - bss.start;
|
|
||||||
__SBSS_END__ = .;
|
|
||||||
|
|
||||||
PROVIDE(_bss_start = ADDR(.bss));
|
PROVIDE(bss.start = __SBSS_START__);
|
||||||
PROVIDE(_bss_size = SIZEOF(.bss));
|
PROVIDE(bss.size = __SBSS2_END__ - __SBSS_START__);
|
||||||
PROVIDE(bss.size = SIZEOF(.bss));
|
|
||||||
PROVIDE(_data_start = ADDR(.data));
|
/* align bottom of 32k init stack at a 32k boundary */
|
||||||
PROVIDE(_data_size = SIZEOF(.data));
|
. = . + 0x4000;
|
||||||
PROVIDE(_text_start = ADDR(.text));
|
. = ALIGN( 0x8000 );
|
||||||
PROVIDE(_text_size = SIZEOF(.text));
|
stack.start = .;
|
||||||
PROVIDE(_end = bss.end);
|
. = . + 0x8000;
|
||||||
|
stack.end = .;
|
||||||
|
/*
|
||||||
|
* Interrupt stack setup
|
||||||
|
*/
|
||||||
|
IntrStack_start = ALIGN(0x10);
|
||||||
|
. += 0x4000;
|
||||||
|
IntrStack_end = .;
|
||||||
|
|
||||||
|
PROVIDE(_end = . );
|
||||||
|
|
||||||
|
|
||||||
.gzipmalloc : {
|
.gzipmalloc : {
|
||||||
@@ -232,14 +255,6 @@ SECTIONS
|
|||||||
} >RAM
|
} >RAM
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Interrupt stack setup
|
|
||||||
*/
|
|
||||||
IntrStack_start = ALIGN(0x10);
|
|
||||||
. += 0x4000;
|
|
||||||
intrStack = .;
|
|
||||||
PROVIDE(intrStackPtr = intrStack);
|
|
||||||
|
|
||||||
/* Sections for compressed .text and .data */
|
/* Sections for compressed .text and .data */
|
||||||
/* after the .datarom section is an int specifying */
|
/* after the .datarom section is an int specifying */
|
||||||
/* the length of the following compressed image */
|
/* the length of the following compressed image */
|
||||||
@@ -258,19 +273,6 @@ SECTIONS
|
|||||||
} >RAM
|
} >RAM
|
||||||
dr_len = _dr_end - _dr_start;
|
dr_len = _dr_end - _dr_start;
|
||||||
|
|
||||||
/* align bottom of 32k init stack at a 32k boundary */
|
|
||||||
. = . + 0x4000;
|
|
||||||
. = ALIGN( 0x8000 );
|
|
||||||
stack.start = .;
|
|
||||||
. = . + 0x8000;
|
|
||||||
stack.end = .;
|
|
||||||
/*
|
|
||||||
* Interrupt stack setup
|
|
||||||
*/
|
|
||||||
IntrStack_start = ALIGN(0x10);
|
|
||||||
. += 0x4000;
|
|
||||||
intrStack = .;
|
|
||||||
PROVIDE(intrStackPtr = intrStack);
|
|
||||||
|
|
||||||
.line 0 : { *(.line) }
|
.line 0 : { *(.line) }
|
||||||
.debug 0 : { *(.debug) }
|
.debug 0 : { *(.debug) }
|
||||||
|
|||||||
Reference in New Issue
Block a user