-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7959f00
commit eef5a6b
Showing
1 changed file
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/* SPDX-License-Identifier: Apache-2.0 */ | ||
|
||
OUTPUT_FORMAT("elf64-littleriscv", "elf64-littleriscv", "elf64-littleriscv") | ||
OUTPUT_ARCH("riscv") | ||
SEARCH_DIR(.) | ||
|
||
/* Memory Spaces Definitions */ | ||
MEMORY | ||
{ | ||
ram (rwx) : ORIGIN = @ARCH_START_ADDRESS@, LENGTH = @ARCH_SRAM_LENGTH@ /* SRAMC. 132K on boot mode, 100K on FEL mode */ | ||
} | ||
|
||
/* The stack size used by the application. NOTE: you need to adjust according to your application. */ | ||
STACK_SIZE = 0x1000; /* 4KB */ | ||
|
||
/* Section Definitions */ | ||
SECTIONS | ||
{ | ||
|
||
.text : | ||
{ | ||
. = ALIGN(4); | ||
PROVIDE(__spl_start = .); | ||
*(.text .text.*) | ||
PROVIDE(__ddr_bin_start = .); | ||
KEEP(*(.init_dram_bin)) | ||
PROVIDE(__ddr_bin_end = .); | ||
KEEP(*(.note.gnu.build-id)) | ||
. = ALIGN(4); | ||
} > ram | ||
|
||
. = ALIGN(4); | ||
|
||
PROVIDE(__spl_end = .); | ||
PROVIDE(__spl_size = __spl_end - __spl_start); | ||
|
||
/* .bss section which is used for uninitialized data */ | ||
.bss (NOLOAD) : | ||
{ | ||
. = ALIGN(4); | ||
_sbss = . ; | ||
*(.bss .bss.*) | ||
*(COMMON) | ||
. = ALIGN(4); | ||
_ebss = . ; | ||
} > ram | ||
|
||
.stack (NOLOAD): | ||
{ | ||
. = ALIGN(8); | ||
/* SRV stack section */ | ||
__stack_srv_start = .; | ||
. += STACK_SIZE; | ||
__stack_srv_end = .; | ||
} > ram | ||
|
||
. = ALIGN(4); | ||
_end = . ; | ||
} |