source: rtems/c/src/lib/libbsp/h8300/h8sim/startup/linkcmds @ 3631dad8

4.104.114.84.95
Last change on this file since 3631dad8 was 3631dad8, checked in by Joel Sherrill <joel.sherrill@…>, on Jul 31, 2000 at 7:23:21 PM

Closer to linking. h8300-rtems-ld now core dumps.

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