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

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since f8fb03b was d22be89, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 7 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
RevLine 
[8b6aa39]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 {
[8a1afd2]16 kernel_load_address = PA2KA(BOOT_OFFSET);
17
[d22be89]18 .image (PA2KA(BOOT_OFFSET) + SIZEOF_HEADERS) : AT (BOOT_OFFSET + SIZEOF_HEADERS) {
[8b6aa39]19 ktext_start = .;
[d639eaa]20 *(K_TEXT_START);
[8b6aa39]21 *(.text);
22 ktext_end = .;
[f1380b7]23
[8b6aa39]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 }
[f1380b7]38
[8b6aa39]39 /DISCARD/ : {
40 *(.mdebug*);
41 *(.pdr);
42 *(.comment);
43 *(.note);
44 }
45}
Note: See TracBrowser for help on using the repository browser.