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

Subversion Repositories or1k

[/] [or1k/] [tags/] [newlib-1-8-2/] [newlib/] [libgloss/] [m68k/] [idp.ld] - Blame information for rev 39

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
    *(.ctors)
85
    LONG(0)
86
    __CTOR_END__ = .;
87
    __DTOR_LIST__ = .;
88
    ___DTOR_LIST__ = .;
89
    LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
90
    *(.dtors)
91
     LONG(0)
92
    __DTOR_END__ = .;
93
    *(.rodata)
94
    *(.gcc_except_table)
95
 
96
    __INIT_SECTION__ = . ;
97
    LONG (0x4e560000)   /* linkw %fp,#0 */
98
    *(.init)
99
    SHORT (0x4e5e)      /* unlk %fp */
100
    SHORT (0x4e75)      /* rts */
101
 
102
    __FINI_SECTION__ = . ;
103
    LONG (0x4e560000)   /* linkw %fp,#0 */
104
    *(.fini)
105
    SHORT (0x4e5e)      /* unlk %fp */
106
    SHORT (0x4e75)      /* rts */
107
 
108
    _etext = .;
109
    *(.lit)
110
  } > ram
111
 
112
  .data :
113
  {
114
    *(.shdata)
115
    *(.data)
116
    _edata = .;
117
  } > ram
118
 
119
  .bss :
120
  {
121
    . = ALIGN(0x4);
122
    __bss_start = . ;
123
    *(.shbss)
124
    *(.bss)
125
    *(COMMON)
126
    _end =  ALIGN (0x8);
127
    __end = _end;
128
  } > ram
129
 
130
  .stab 0 (NOLOAD) :
131
  {
132
    *(.stab)
133
  }
134
 
135
  .stabstr 0 (NOLOAD) :
136
  {
137
    *(.stabstr)
138
  }
139
}

powered by: WebSVN 2.1.0

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