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

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [gnu/] [binutils/] [ld/] [scripttempl/] [ip2k.sc] - Blame information for rev 299

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

Line No. Rev Author Line
1 145 khays
cat << EOF
2
OUTPUT_FORMAT("elf32-ip2k", "elf32-ip2k", "elf32-ip2k")
3
OUTPUT_ARCH(ip2k)
4
${RELOCATING+ENTRY(_start)}
5
SEARCH_DIR(.);
6
 
7
/* IP2022 default linker script.  */
8
 
9
MEMORY
10
{
11
        D_GPR    : org = 0x01000080, len = 128
12
        D_RAM    : org = 0x01000100, len = 4K - 256
13
        P_RAM    : org = 0x02000000, len = 16K
14
        P_ROM    : org = 0x02010000, len = 64K - 32
15
        P_RESET  : org = 0x0201FFE0, len = 32
16
        P_CONFIG : org = 0x02020000, len = 128
17
}
18
 
19
SECTIONS
20
{
21
        /* Allocated memory end markers
22
           (initialized to start of appropiate memory address).  */
23
        __data_end  = 0x01000100;
24
        __pram_end  = 0x02000000;
25
        __flash_end = 0x02010000;
26
 
27
        /* Global general purpose registers in direct addressing range.  */
28
        .gpr 0x01000080 :
29
        {
30
                *(.gpr)
31
        } >D_GPR
32
 
33
        /* Pre-allocated, pre-initialized data memory.  */
34
        __data_run_begin = __data_end;
35
        __data_load_begin = (__flash_end + 1) & 0xFFFFFFFE;
36
        .data __data_run_begin : AT (__data_load_begin)
37
        {
38
                * (.data);
39
                * (.rodata)
40
        } >D_RAM
41
        __data_run_end  = __data_run_begin  + SIZEOF(.data);
42
        __data_load_end = __data_load_begin + SIZEOF(.data);
43
        __data_end      = __data_run_end;
44
        __flash_end     = __data_load_end;
45
 
46
        /* Pre-allocated, uninitialized data memory.  */
47
        __bss_begin = __data_end;
48
        .bss __bss_begin :
49
        {
50
                * (.bss)
51
        } >D_RAM
52
        __bss_end  = __bss_begin + SIZEOF(.bss);
53
        __data_end = __bss_end;
54
 
55
        /* Pre-allocated PRAM data memory.  */
56
        __pram_data_begin = (__pram_end + 1) & 0xFFFFFFFE;
57
        .pram_data __pram_data_begin :
58
        {
59
                * (.pram_data)
60
        } >P_RAM
61
        __pram_data_end = __pram_data_begin + SIZEOF(.pram_data);
62
        __pram_end      = __pram_data_end;
63
 
64
        /* PRAM code.  */
65
        __pram_run_begin  = (__pram_end + 1) & 0xFFFFFFFE;
66
        __pram_load_begin = (__flash_end + 1) & 0xFFFFFFFE;
67
        .pram __pram_run_begin : AT (__pram_load_begin)
68
        {
69
                * (.pram)
70
        } >P_RAM
71
        __pram_run_end  = __pram_run_begin  + SIZEOF(.pram);
72
        __pram_load_end = __pram_load_begin + SIZEOF(.pram);
73
 
74
        __pram_load_shift = ((__pram_run_begin - __pram_load_begin) & 0x1FFFF) | 0x02000000;
75
        __pram_end  = __pram_run_end;
76
        __flash_end = __pram_load_end;
77
 
78
        /* PRAM overlay code.  */
79
        __pram_overlay_run_start  = (__pram_end  + 1) & 0xFFFFFFFE;
80
        __pram_overlay_load_start = (__flash_end + 1) & 0xFFFFFFFE;
81
        OVERLAY __pram_overlay_run_start : AT (__pram_overlay_load_start)
82
        {
83
                .pram1 { */overlay1/* (.pram); * (.pram1) }
84
                .pram2 { */overlay2/* (.pram); * (.pram2) }
85
        } >P_RAM
86
        __pram_overlay_run_end = .;
87
        __pram_overlay_load_end = __pram_overlay_load_start + SIZEOF(.pram1) + SIZEOF(.pram2);
88
        __pram_end  = __pram_overlay_run_end;
89
        __flash_end = __pram_overlay_load_end;
90
 
91
        /* Flash code.  */
92
        __text_begin = (__flash_end + 1) & 0xFFFFFFFE;
93
        .text __text_begin :
94
        {
95
                * (.text);
96
                * (.text.libgcc)
97
        } >P_ROM = 0xffff
98
        __text_end  = __text_begin + SIZEOF(.text);
99
        __flash_end = __text_end;
100
 
101
        /* Strings.  */
102
        __strings_begin = (__flash_end + 1) & 0xFFFFFFFE;
103
        .strings __strings_begin :
104
        {
105
                * (strings);
106
                * (.progmem.data)
107
        } >P_ROM = 0xffff
108
        __strings_end = __strings_begin + SIZEOF (.strings);
109
        __flash_end   = __strings_end;
110
 
111
        .ctors : { * (.ctors) } > P_ROM
112
        .dtors : { * (.dtors) } > P_ROM
113
 
114
        /* Reset code.  */
115
        .reset  : { * (.reset)  } >P_RESET  = 0xffff
116
 
117
        /* Configuration block.  */
118
        .config : { * (.config) } >P_CONFIG = 0xffff
119
 
120
        /* Stack.  */
121
        PROVIDE (__stack = 0x01000FFF);
122
 
123
        /* Stabs debugging sections.  */
124
        .stab           0 : { *(.stab) }
125
        .stabstr        0 : { *(.stabstr) }
126
        .stab.excl      0 : { *(.stab.excl) }
127
        .stab.exclstr   0 : { *(.stab.exclstr) }
128
        .stab.index     0 : { *(.stab.index) }
129
        .stab.indexstr  0 : { *(.stab.indexstr) }
130
        .comment        0 : { *(.comment) }
131
 
132
        /* DWARF 1.  */
133
        .debug          0 : { *(.debug) }
134
        .line           0 : { *(.line) }
135
        /* GNU DWARF 1 extensions.  */
136
        .debug_srcinfo  0 : { *(.debug_srcinfo) }
137
        .debug_sfnames  0 : { *(.debug_sfnames) }
138
        /* DWARF 1.1 and DWARF 2.  */
139
        .debug_aranges  0 : { *(.debug_aranges) }
140
        .debug_pubnames 0 : { *(.debug_pubnames) }
141
        /* DWARF 2.  */
142
        .debug_info     0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
143
        .debug_abbrev   0 : { *(.debug_abbrev) }
144
        .debug_line     0 : { *(.debug_line) }
145
        .debug_frame    0 : { *(.debug_frame) }
146
        .debug_str      0 : { *(.debug_str) }
147
        .debug_loc      0 : { *(.debug_loc) }
148
        .debug_macinfo  0 : { *(.debug_macinfo) }
149
}
150
EOF

powered by: WebSVN 2.1.0

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