source: rtems/c/src/lib/libbsp/h8300/h8sim/startup/linkcmds @ 501d312

4.104.114.84.95
Last change on this file since 501d312 was 501d312, checked in by Joel Sherrill <joel.sherrill@…>, on Jul 6, 2000 at 8:07:34 PM

Added baseline for h8 simulator BSP to support the simulator in gdb 5.0

  • Property mode set to 100644
File size: 1.9 KB
Line 
1/*
2 *  $Id$
3 */
4
5/*
6 * Declare some sizes.
7 */
8_RamBase = DEFINED(_RamBase) ? _RamBase : 0x0;
9_RamSize = DEFINED(_RamSize) ? _RamSize : 1M;
10_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
11_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
12
13ENTRY("_start")
14/* The memory size is 256KB to coincide with the simulator.
15   Don't change either without considering the other.  */
16MEMORY
17{
18  /* 0xc4 is a magic entry.  We should have the linker just
19  skip over it one day... */
20  vectors : o = 0x0000, l = 0xc4
21  magicvectors : o = 0xc4, l = 0x3c
22  /* We still only use 256k as the main ram size.  */
23  ram    : o = 0x0100, l = 0x3fefc
24  /* The stack starts at the top of main ram.  */
25  topram : o = 0x3fffc, l = 0x4
26  /* This holds variables in the "tiny" sections.  */
27  tiny   : o = 0xff8000, l = 0x7f00
28  /* At the very top of the address space is the 8-bit area.  */
29  eight  : o = 0xffff00, l = 0x100
30}
31
32
33SECTIONS
34{
35   .vectors :
36   {
37        *(.vectors)
38   }  > vectors
39
40    .text :
41    {
42         CREATE_OBJECT_SYMBOLS
43        *(.text)
44         _etext = .;
45       
46/*
47        ___CTOR_LIST__ = .;
48        LONG((___CTOR_END__ - ___CTOR_LIST__) / 4 - 2)
49        *(.ctors)
50        LONG(0)
51        ___CTOR_END__ = .;
52        ___DTOR_LIST__ = .;
53        LONG((___DTOR_END__ - ___DTOR_LIST__) / 4 - 2)
54        *(.dtors)
55        LONG(0)
56        ___DTOR_END__ = .;
57*/
58    }  >ram
59    .data SIZEOF(.text) + ADDR(.text):
60    {
61        *(.data)
62        CONSTRUCTORS
63         _edata = .;
64    }  >ram
65    .bss SIZEOF(.data) + ADDR(.data):
66    {
67         _bss_start = .;
68        *(.bss) 
69        *(COMMON)
70        . = ALIGN (64);
71        . += _StackSize;
72        _stack_init = .;
73        _clear_end = .;
74        _WorkspaceBase = .;
75        . += 512K;      /* reserve some memory for workspace */
76        _HeapBase = .;
77        . += _HeapSize; /* reserve some memory for heap */
78         _end = .;
79         __end = .;
80    } >ram
81    .tiny : {
82        *(.tiny)
83    }  > tiny
84    .eight : {
85        *(.eight)
86    }  > eight
87    .stab 0 (NOLOAD) : {
88        [ .stab ]
89    }
90    .stabstr 0 (NOLOAD) : {
91        [ .stabstr ]
92    }
93
94}
Note: See TracBrowser for help on using the repository browser.