OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib/] [libgloss/] [m68k/] [idp.ld] - Blame information for rev 1767

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 39 lampret
STARTUP(crt0.o)
2
OUTPUT_ARCH(m68k)
3
/* Uncomment this if you want srecords. This is needed for a.out
4
 * if you plan to use GDB.
5
OUTPUT_FORMAT(srec)
6
 */
7
 
8
SEARCH_DIR(.)
9
GROUP(-lidp -lc -lgcc)
10
__DYNAMIC  =  0;
11
 
12
/*
13
 * Setup the memory map of the MC68ec0x0 Board (IDP)
14
 * stack grows down from high memory. This works for
15
 * both the rom68k and the mon68k monitors.
16
 *
17
 * The memory map look like this:
18
 * +--------------------+ <- low memory
19
 * | .text              |
20
 * |        _etext      |
21
 * |        ctor list   | the ctor and dtor lists are for
22
 * |        dtor list   | C++ support
23
 * +--------------------+
24
 * | .data              | initialized data goes here
25
 * |        _edata      |
26
 * +--------------------+
27
 * | .bss               |
28
 * |        __bss_start | start of bss, cleared by crt0
29
 * |        _end        | start of heap, used by sbrk()
30
 * +--------------------+
31
 * .                    .
32
 * .                    .
33
 * .                    .
34
 * |        __stack     | top of stack
35
 * +--------------------+
36
 */
37
 
38
/*
39
 * When the IDP is not remapped (see rom68k's MP command in the
40
 * "M68EC0x0IDP Users Manual", the first 64K bytes are reserved;
41
 * Otherwise the first 256K bytes are reserved.
42
 *
43
 * The following memory map describes a unmapped IDP w/2MB RAM.
44
 */
45
 
46
MEMORY
47
{
48
  ram (rwx) : ORIGIN = 0x00010000, LENGTH = 2M-64K
49
  rom0      : ORIGIN = 0x00800000, LENGTH = 1M
50
  rom1      : ORIGIN = 0x00900000, LENGTH = 1M
51
}
52
 
53
/*
54
 * allocate the stack to be at the top of memory, since the stack
55
 * grows down
56
 */
57
 
58
PROVIDE (__stack = 2M - 8);
59
 
60
/*
61
 * Initalize some symbols to be zero so we can reference them in the
62
 * crt0 without core dumping. These functions are all optional, but
63
 * we do this so we can have our crt0 always use them if they exist.
64
 * This is so BSPs work better when using the crt0 installed with gcc.
65
 * We have to initalize them twice, so we cover a.out (which prepends
66
 * an underscore) and coff object file formats.
67
 */
68
PROVIDE (hardware_init_hook = 0);
69
PROVIDE (_hardware_init_hook = 0);
70
PROVIDE (software_init_hook = 0);
71
PROVIDE (_software_init_hook = 0);
72
/*
73
 * stick everything in ram (of course)
74
 */
75
SECTIONS
76
{
77
  .text :
78
  {
79
    *(.text)
80
    . = ALIGN(0x4);
81
     __CTOR_LIST__ = .;
82
    ___CTOR_LIST__ = .;
83
    LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
84 56 joel
    KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
85
    KEEP (*(SORT(.ctors.*)))
86
    KEEP (*crtend.o(.ctors))
87 39 lampret
    LONG(0)
88
    __CTOR_END__ = .;
89
    __DTOR_LIST__ = .;
90
    ___DTOR_LIST__ = .;
91
    LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
92 56 joel
    KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
93
    KEEP (*(SORT(.dtors.*)))
94
    KEEP (*crtend.o(.dtors))
95 39 lampret
     LONG(0)
96
    __DTOR_END__ = .;
97
    *(.rodata)
98 56 joel
 
99
    . = ALIGN(0x4);
100 39 lampret
    *(.gcc_except_table)
101
 
102 56 joel
    . = ALIGN(0x4);
103
    *(.eh_frame)
104
 
105
    . = ALIGN(0x4);
106 39 lampret
    __INIT_SECTION__ = . ;
107
    LONG (0x4e560000)   /* linkw %fp,#0 */
108
    *(.init)
109
    SHORT (0x4e5e)      /* unlk %fp */
110
    SHORT (0x4e75)      /* rts */
111
 
112 56 joel
    . = ALIGN(0x4);
113 39 lampret
    __FINI_SECTION__ = . ;
114
    LONG (0x4e560000)   /* linkw %fp,#0 */
115
    *(.fini)
116
    SHORT (0x4e5e)      /* unlk %fp */
117
    SHORT (0x4e75)      /* rts */
118
 
119
    _etext = .;
120
    *(.lit)
121
  } > ram
122
 
123
  .data :
124
  {
125
    *(.shdata)
126
    *(.data)
127
    _edata = .;
128
  } > ram
129
 
130
  .bss :
131
  {
132
    . = ALIGN(0x4);
133
    __bss_start = . ;
134
    *(.shbss)
135
    *(.bss)
136
    *(COMMON)
137
    _end =  ALIGN (0x8);
138
    __end = _end;
139
  } > ram
140
 
141
  .stab 0 (NOLOAD) :
142
  {
143
    *(.stab)
144
  }
145
 
146
  .stabstr 0 (NOLOAD) :
147
  {
148
    *(.stabstr)
149
  }
150
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.