xref: /openbmc/qemu/tests/tcg/nios2/10m50-ghrd.ld (revision 75ac231c)
1/*
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    } >ram :RAM
48
49    HIDDEN (_gp = ALIGN(16) + 0x7ff0);
50    PROVIDE_HIDDEN (gp = _gp);
51    .got : ALIGN(4) {
52        *(.got.plt) *(.igot.plt) *(.got) *(.igot)
53    } >ram :RAM
54
55    .sdata : ALIGN(4) {
56        *(.sdata .sdata.* .gnu.linkonce.s.*)
57    } >ram :RAM
58
59    .bss : ALIGN(4) {
60         __bss_start = ABSOLUTE(.);
61        *(.sbss .sbss.* .gnu.linkonce.sb.*)
62        *(.scommon)
63        *(.bss .bss.* .gnu.linkonce.b.*)
64        *(COMMON)
65        . = ALIGN(4);
66        __bss_end = ABSOLUTE(.);
67    } >ram :RAM
68
69    __stack = ORIGIN(ram) + LENGTH(ram);
70}
71