1 |
59 |
zero_gravi |
/* ################################################################################################# */
|
2 |
|
|
/* # << NEORV32 - RISC-V GCC Linker Script >> # */
|
3 |
|
|
/* # ********************************************************************************************* # */
|
4 |
|
|
/* # For the execution based on-chip debugger code memory (/ROM() - "park loop" code # */
|
5 |
|
|
/* # ********************************************************************************************* # */
|
6 |
|
|
/* # BSD 3-Clause License # */
|
7 |
|
|
/* # # */
|
8 |
|
|
/* # Copyright (c) 2021, Stephan Nolting. All rights reserved. # */
|
9 |
|
|
/* # # */
|
10 |
|
|
/* # Redistribution and use in source and binary forms, with or without modification, are # */
|
11 |
|
|
/* # permitted provided that the following conditions are met: # */
|
12 |
|
|
/* # # */
|
13 |
|
|
/* # 1. Redistributions of source code must retain the above copyright notice, this list of # */
|
14 |
|
|
/* # conditions and the following disclaimer. # */
|
15 |
|
|
/* # # */
|
16 |
|
|
/* # 2. Redistributions in binary form must reproduce the above copyright notice, this list of # */
|
17 |
|
|
/* # conditions and the following disclaimer in the documentation and/or other materials # */
|
18 |
|
|
/* # provided with the distribution. # */
|
19 |
|
|
/* # # */
|
20 |
|
|
/* # 3. Neither the name of the copyright holder nor the names of its contributors may be used to # */
|
21 |
|
|
/* # endorse or promote products derived from this software without specific prior written # */
|
22 |
|
|
/* # permission. # */
|
23 |
|
|
/* # # */
|
24 |
|
|
/* # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS # */
|
25 |
|
|
/* # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # */
|
26 |
|
|
/* # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE # */
|
27 |
|
|
/* # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # */
|
28 |
|
|
/* # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE # */
|
29 |
|
|
/* # GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED # */
|
30 |
|
|
/* # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # */
|
31 |
|
|
/* # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED # */
|
32 |
|
|
/* # OF THE POSSIBILITY OF SUCH DAMAGE. # */
|
33 |
|
|
/* # ********************************************************************************************* # */
|
34 |
|
|
/* # The NEORV32 Processor - https://github.com/stnolting/neorv32 (c) Stephan Nolting # */
|
35 |
|
|
/* ################################################################################################# */
|
36 |
|
|
|
37 |
|
|
/* Default linker script, for normal executables */
|
38 |
|
|
/* Copyright (C) 2014-2020 Free Software Foundation, Inc.
|
39 |
|
|
Copying and distribution of this script, with or without modification,
|
40 |
|
|
are permitted in any medium without royalty provided the copyright
|
41 |
|
|
notice and this notice are preserved. */
|
42 |
|
|
|
43 |
|
|
/* modified for the NEORV32 processor by Stephan Nolting */
|
44 |
|
|
|
45 |
|
|
|
46 |
|
|
OUTPUT_FORMAT("elf32-littleriscv", "elf32-littleriscv", "elf32-littleriscv")
|
47 |
|
|
OUTPUT_ARCH(riscv)
|
48 |
|
|
ENTRY(_start)
|
49 |
|
|
SEARCH_DIR("/opt/riscv/riscv32-unknown-elf/lib"); SEARCH_DIR("=/opt/riscv/riscv64-unknown-linux-gnu/lib"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib");
|
50 |
|
|
|
51 |
|
|
MEMORY
|
52 |
|
|
{
|
53 |
|
|
debug_mem (rx) : ORIGIN = 0xFFFFF800, LENGTH = 128
|
54 |
|
|
}
|
55 |
|
|
/* ************************************************************************* */
|
56 |
|
|
|
57 |
|
|
SECTIONS
|
58 |
|
|
{
|
59 |
|
|
|
60 |
|
|
/* Actual instructions */
|
61 |
|
|
.text :
|
62 |
|
|
{
|
63 |
|
|
KEEP(*(.text));
|
64 |
|
|
|
65 |
|
|
} > debug_mem
|
66 |
|
|
|
67 |
|
|
}
|