URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libbsp/] [i386/] [ts_386ex/] [startup/] [linkcmds] - Rev 173
Compare with Previous | Blame | View Log
/*
* This file contains directives for the GNU linker which are specific
* to the Technologic Systems TS-1325 (i386ex) board.
*
* Copyright (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* Copyright assigned to U.S. Government, 1994.
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* $Id: linkcmds,v 1.2 2001-09-27 11:59:50 chris Exp $
*
* Memory layout:
*
* 0x0008000 -> ... : initial section ( init 386ex, goto protected mode)
* ... -> ... : text section ( executable code )
* ... -> 0x00A0000 : data section ( initialized storage )
* 0x0100000 -> 0x0200000 : bss section, stack space, heap storage
*/
ENTRY(_init_i386ex) ;
SECTIONS
{
/***************************************************************************
* initial section:
*
* This subsection of ".text" is the first in memory, and executed by the DOS
* loader. It initializes the i386ex, sets up the gdt in RAM, loads the gdt,
* jumps to protected mode, loads the idt, zeros the bss section, sets up
* the stack and calls the rest of the RTEMS initialization.
***************************************************************************/
_DOS_ld_addr = 0x0008000 ;
/***************************************************************************
* text section:
*
* Nobody here but us opcodes.
***************************************************************************/
.text _DOS_ld_addr :
{
CREATE_OBJECT_SYMBOLS
text_start = . ;
_text_start = . ;
*(.initial);
. = ALIGN(0x20);
*(.text );
. = ALIGN (0x20);
*(.eh_frame)
. = ALIGN (0x20);
*(.gnu.linkonce.t*)
. = ALIGN(0x20);
/*
* C++ constructors
*/
__CTOR_LIST__ = .;
LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
*(.ctors)
LONG(0)
__CTOR_END__ = .;
. = ALIGN (4) ;
__DTOR_LIST__ = .;
LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
*(.dtors)
LONG(0)
__DTOR_END__ = .;
_rodata_start = . ;
*(.rodata)
. = ALIGN(0x20);
_erodata = .;
*(.gnu.linkonce.r*)
. = ALIGN(0x20);
_endtext = . ;
}
/***************************************************************************
* ctor/dtor sections:
*
* These sections house the global constructors and destructors.
***************************************************************************/
.init BLOCK(0x20) :
{
*(.init)
} = 0x9090
.fini BLOCK(0x20) :
{
*(.fini)
} = 0x9090
/***************************************************************************
* data section:
*
* This section defines the location of the data section in RAM.
***************************************************************************/
.data BLOCK(0x20) :
{
_sdata = .;
*(.data);
. = ALIGN(0x20);
*(.gnu.linkonce.d*)
. = ALIGN(0x20);
*(.gcc_except_table)
. = ALIGN(0x20);
_edata = .;
}
_data_size = _edata - _sdata ;
/***************************************************************************
* bss section:
*
* The bss section is the first section in extended RAM ( > 1MB).
***************************************************************************/
.bss 0x100000 (NOLOAD) :
{
_bss_start = .;
*(.bss);
*(COMMON);
_ebss = ALIGN(0x20);
}
_bss_size = _ebss - _bss_start ;
/***************************************************************************
* discard section:
*
* This section is used to throw away stuff we don't want.
***************************************************************************/
/DISCARD/ :
{
*(.comment);
*(.note);
}
/***************************************************************************
* General variables:
*
* The stack_size variable is customizable here. The heap is located directly
* after the stack in RAM. A routine within bspstart.c uses these variables
* to ensure that the heap used by RTEMS is as large as the RAM remaining
* after all workspace configurations are complete.
***************************************************************************/
stack_size = 0x8000 ;
stack_origin = _ebss + stack_size ;
heap_bottom = stack_origin + 4 ;
}