source: mainline/kernel/arch/riscv64/_link.ld.in@ 2fff3c4

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 2fff3c4 was d22be89, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 6 years ago

Fix riscv64 kernel load address

The bootloader checks that it matches the address it's actually loading at.

  • Property mode set to 100644
File size: 800 bytes
Line 
1/*
2 * RISC-V 64 linker script
3 *
4 * kernel text
5 * kernel data
6 *
7 */
8
9OUTPUT_ARCH(riscv)
10ENTRY(kernel_image_start)
11
12#include <arch/boot/boot.h>
13#include <arch/mm/page.h>
14
15SECTIONS {
16 kernel_load_address = PA2KA(BOOT_OFFSET);
17
18 .image (PA2KA(BOOT_OFFSET) + SIZEOF_HEADERS) : AT (BOOT_OFFSET + SIZEOF_HEADERS) {
19 ktext_start = .;
20 *(K_TEXT_START);
21 *(.text);
22 ktext_end = .;
23
24 kdata_start = .;
25 *(.data); /* initialized data */
26 *(.rodata*);
27 *(.sdata);
28 *(.reginfo);
29 *(.sbss);
30 *(.scommon);
31 *(.bss); /* uninitialized static variables */
32 *(COMMON); /* global variables */
33 . = ALIGN(8);
34 symbol_table = .;
35 *(symtab.*);
36 kdata_end = .;
37 }
38
39 /DISCARD/ : {
40 *(.mdebug*);
41 *(.pdr);
42 *(.comment);
43 *(.note);
44 }
45}
Note: See TracBrowser for help on using the repository browser.