source: rtems/c/src/lib/libbsp/h8300/h8sim/startup/linkcmds @ 960fd85

4.115
Last change on this file since 960fd85 was 960fd85, checked in by Sebastian Huber <sebastian.huber@…>, on Jan 28, 2014 at 10:52:17 AM

bsps: Thread-local storage (TLS) for linkcmds

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