source: rtems/c/src/lib/libbsp/arm/armulator/startup/linkcmds @ 1144653

4.104.114.84.95
Last change on this file since 1144653 was 04a8c937, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/07 at 20:32:05

2007-05-03 Joel Sherrill <joel@…>

  • startup/linkcmds: Add alignment between data and bss to avoid linking errors when compiling with gcc 4.2.x
  • Property mode set to 100644
File size: 2.6 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
13SECTIONS
14{
15    . = 0x8000;
16    .text :
17    {
18         CREATE_OBJECT_SYMBOLS
19        *(.text)
20        *(.rodata*)
21        *(.gnu.linkonce.r*)
22
23        /*
24         * Special FreeBSD sysctl sections.
25         */
26        . = ALIGN (16);
27        __start_set_sysctl_set = .;
28        *(set_sysctl_*);
29        __stop_set_sysctl_set = ABSOLUTE(.);
30        *(set_domain_*);
31        *(set_pseudo_*);
32
33         _etext = .;
34       
35        ___CTOR_LIST__ = .;
36        LONG((___CTOR_END__ - ___CTOR_LIST__) / 4 - 2)
37        *(.ctors)
38        LONG(0)
39        ___CTOR_END__ = .;
40        ___DTOR_LIST__ = .;
41        LONG((___DTOR_END__ - ___DTOR_LIST__) / 4 - 2)
42        *(.dtors)
43        LONG(0)
44        ___DTOR_END__ = .;
45    } 
46    . = ALIGN(256) + (. & (256 - 1));
47    .data :
48    {
49        *(.data)
50        *(.jcr)
51        *(.gnu.linkonce.d*)
52        CONSTRUCTORS
53         _edata = .;
54    } 
55    . = ALIGN(256) + (. & (256 - 1));
56    .bss :
57    {
58         _bss_start = .;
59        _clear_start = .;
60        *(.bss) 
61        *(.gnu.linkonce.b.*)
62        *(COMMON)
63        . = ALIGN (64);
64        _stack_init = .;
65        . += _StackSize;
66        _clear_end = .;
67        _WorkspaceBase = .;
68        . += 512K;      /* reserve some memory for workspace */
69        _HeapBase = .;
70        . += _HeapSize; /* reserve some memory for heap */
71         _end = .;
72         __end = .;
73    }
74/* XXX */
75  /* These are needed for ELF backends which have not yet been
76     converted to the new style linker.  */
77  .stab 0 : { *(.stab) }
78  .stabstr 0 : { *(.stabstr) }
79  /* DWARF debug sections.
80     Symbols in the DWARF debugging sections are relative to the beginning
81     of the section so we begin them at 0.  */
82  /* DWARF 1 */
83  .debug          0 : { *(.debug) }
84  .line           0 : { *(.line) }
85  /* GNU DWARF 1 extensions */
86  .debug_srcinfo  0 : { *(.debug_srcinfo) }
87  .debug_sfnames  0 : { *(.debug_sfnames) }
88  /* DWARF 1.1 and DWARF 2 */
89  .debug_aranges  0 : { *(.debug_aranges) }
90  .debug_pubnames 0 : { *(.debug_pubnames) }
91  /* DWARF 2 */
92  .debug_info     0 : { *(.debug_info) }
93  .debug_abbrev   0 : { *(.debug_abbrev) }
94  .debug_line     0 : { *(.debug_line) }
95  .debug_frame    0 : { *(.debug_frame) }
96  .debug_str      0 : { *(.debug_str) }
97  .debug_loc      0 : { *(.debug_loc) }
98  .debug_macinfo  0 : { *(.debug_macinfo) }
99  /* SGI/MIPS DWARF 2 extensions */
100  .debug_weaknames 0 : { *(.debug_weaknames) }
101  .debug_funcnames 0 : { *(.debug_funcnames) }
102  .debug_typenames 0 : { *(.debug_typenames) }
103  .debug_varnames  0 : { *(.debug_varnames) }
104  /* These must appear regardless of  .  */
105
106}
107
108HeapBase = _HeapBase;
109HeapSize = _HeapSize;
110WorkspaceBase = _WorkspaceBase;
Note: See TracBrowser for help on using the repository browser.