source: trunk/libs/newlib/src/libgloss/m68k/mvme135.ld @ 684

Last change on this file since 684 was 444, checked in by satin@…, 7 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 2.8 KB
RevLine 
[444]1STARTUP(crt0.o)
2OUTPUT_ARCH(m68k)
3/* Uncomment this if you want srecords. This is needed for a.out
4 * if you plan to use GDB.
5OUTPUT_FORMAT(srec)
6 */
7SEARCH_DIR(.)
8GROUP(-lmvme135 -lc -lgcc)
9__DYNAMIC  =  0;
10
11/*
12 * Setup the memory map of the Motorola MVME135 Board
13 * stack grows down from high memory.
14 *
15 * The memory map look like this:
16 * +--------------------+ <- low memory
17 * | .text              |
18 * |        _etext      |
19 * |        ctor list   | the ctor and dtor lists are for
20 * |        dtor list   | C++ support
21 * +--------------------+
22 * | .data              | initialized data goes here
23 * |        _edata      |
24 * +--------------------+
25 * | .bss               |
26 * |        __bss_start | start of bss, cleared by crt0
27 * |        _end        | start of heap, used by sbrk()
28 * +--------------------+
29 * .                    .
30 * .                    .
31 * .                    .
32 * |        __stack     | top of stack
33 * +--------------------+
34 */
35
36MEMORY
37{
38  ram (rwx) : ORIGIN = 0x5000, LENGTH = 1M
39}
40
41/*
42 * Allocate the stack to be at the top of memory, since the stack
43 * grows down
44 */
45
46PROVIDE (__stack = 1M - 8);
47
48/*
49 * Initalize some symbols to be zero so we can reference them in the
50 * crt0 without core dumping. These functions are all optional, but
51 * we do this so we can have our crt0 always use them if they exist.
52 * This is so BSPs work better when using the crt0 installed gcc.
53 * We have to initalize them twice, so we cover a.out (which prepends
54 * an underscore) and coff object file formats.
55 */
56PROVIDE (hardware_init_hook = 0);
57PROVIDE (_hardware_init_hook = 0);
58PROVIDE (software_init_hook = 0);
59PROVIDE (_software_init_hook = 0);
60/*
61 * stick everything in ram (of course)
62 */
63SECTIONS
64{
65  .text :
66  {
67    *(.text .text.*)
68    . = ALIGN(0x4);
69     __CTOR_LIST__ = .;
70    ___CTOR_LIST__ = .;
71    LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
72    *(.ctors)
73    LONG(0)
74    __CTOR_END__ = .;
75    __DTOR_LIST__ = .;
76    ___DTOR_LIST__ = .;
77    LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
78    *(.dtors)
79     LONG(0)
80    __DTOR_END__ = .;
81    *(.rodata .rodata.*)
82    *(.gcc_except_table)
83
84    . = ALIGN(0x2);
85    __INIT_SECTION__ = . ;
86    LONG (0x4e560000)   /* linkw %fp,#0 */
87    *(.init)
88    SHORT (0x4e5e)      /* unlk %fp */
89    SHORT (0x4e75)      /* rts */
90
91    __FINI_SECTION__ = . ;
92    LONG (0x4e560000)   /* linkw %fp,#0 */
93    *(.fini)
94    SHORT (0x4e5e)      /* unlk %fp */
95    SHORT (0x4e75)      /* rts */
96
97    _etext = .;
98    *(.lit)
99  } > ram
100
101  .data :
102  {
103    *(.got.plt) *(.got)
104    *(.shdata)
105    *(.data .data.*)
106    _edata = .;
107  } > ram
108
109  .bss :
110  {
111    . = ALIGN(0x4);
112    __bss_start = . ;
113    *(.shbss)
114    *(.bss .bss.*)
115    *(COMMON)
116    _end =  ALIGN (0x8);
117    __end = _end;
118  } > ram
119
120  .stab 0 (NOLOAD) :
121  {
122    *(.stab)
123  }
124
125  .stabstr 0 (NOLOAD) :
126  {
127    *(.stabstr)
128  }
129}
Note: See TracBrowser for help on using the repository browser.