blob: 7db0d59ad7cceff1138cef416cc4f5fac7a92146 [file] [log] [blame]
Richard Hendersonccbaa552022-04-21 08:17:34 -07001/*
2 * Link script for the Nios2 10m50-ghrd board.
3 *
4 * Copyright Linaro Ltd 2022
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 */
7
8MEMORY
9{
10 tpf (rx) : ORIGIN = 0xc0000000, LENGTH = 1K
11 ram (rwx) : ORIGIN = 0xc8000000, LENGTH = 128M
12}
13
14PHDRS
15{
16 RAM PT_LOAD;
17}
18
19ENTRY(_start)
20EXTERN(_start)
21EXTERN(_interrupt)
22EXTERN(_fast_tlb_miss)
23
24SECTIONS
25{
26 /* Begin at the (hardcoded) _interrupt entry point. */
27 .text 0xc8000120 : {
28 *(.text.intr)
29 *(.text .text.* .gnu.linkonce.t.*)
30 } >ram :RAM
31
32 .rodata : ALIGN(4) {
33 *(.rodata .rodata.* .gnu.linkonce.r.*)
34 } > ram :RAM
35
36 .eh_frame_hdr : ALIGN (4) {
37 KEEP (*(.eh_frame_hdr))
38 *(.eh_frame_entry .eh_frame_entry.*)
39 } >ram :RAM
40 .eh_frame : ALIGN (4) {
41 KEEP (*(.eh_frame)) *(.eh_frame.*)
42 } >ram :RAM
43
44 .data : ALIGN(4) {
45 *(.shdata)
46 *(.data .data.* .gnu.linkonce.d.*)
47 . = ALIGN(4);
48 _gp = ABSOLUTE(. + 0x8000);
49 *(.got.plt) *(.got)
50 *(.lit8)
51 *(.lit4)
52 *(.sdata .sdata.* .gnu.linkonce.s.*)
53 } >ram :RAM
54
55 .bss : ALIGN(4) {
56 __bss_start = ABSOLUTE(.);
57 *(.sbss .sbss.* .gnu.linkonce.sb.*)
58 *(.scommon)
59 *(.bss .bss.* .gnu.linkonce.b.*)
60 *(COMMON)
61 . = ALIGN(4);
62 __bss_end = ABSOLUTE(.);
63 } >ram :RAM
64
65 __stack = ORIGIN(ram) + LENGTH(ram);
66}