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

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 4bf0926e was 8b6aa39, checked in by Martin Decky <martin@…>, 9 years ago

dummy/fake support for RISC-V (RV64G)
it compiles and the boot loader extracts the system components, but otherwise the source serves only as a placeholder for future working implementation

  • Property mode set to 100644
File size: 1.3 KB
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 .unmapped BOOT_OFFSET: AT (0) {
17 unmapped_ktext_start = .;
18 *(K_TEXT_START);
19 unmapped_ktext_end = .;
20
21 unmapped_kdata_start = .;
22 *(K_DATA_START);
23 *(K_INI_PTLS);
24 unmapped_kdata_end = .;
25 }
26
27 .mapped (BOOT_OFFSET + SIZEOF(.unmapped)) : AT (SIZEOF(.unmapped)) {
28 ktext_start = .;
29 *(.text);
30 ktext_end = .;
31
32 kdata_start = .;
33 *(.data); /* initialized data */
34 *(.rodata*);
35 hardcoded_load_address = .;
36 QUAD(PA2KA(BOOT_OFFSET));
37 hardcoded_ktext_size = .;
38 QUAD(ktext_end - ktext_start + (unmapped_ktext_end - unmapped_ktext_start));
39 hardcoded_kdata_size = .;
40 QUAD(kdata_end - kdata_start + (unmapped_kdata_end - unmapped_kdata_start));
41 hardcoded_unmapped_ktext_size = .;
42 QUAD(unmapped_ktext_end - unmapped_ktext_start);
43 hardcoded_unmapped_kdata_size = .;
44 QUAD(unmapped_kdata_end - unmapped_kdata_start);
45 *(.sdata);
46 *(.reginfo);
47 *(.sbss);
48 *(.scommon);
49 *(.bss); /* uninitialized static variables */
50 *(COMMON); /* global variables */
51 . = ALIGN(8);
52 symbol_table = .;
53 *(symtab.*);
54 kdata_end = .;
55 }
56
57 /DISCARD/ : {
58 *(.mdebug*);
59 *(.pdr);
60 *(.comment);
61 *(.note);
62 }
63}
Note: See TracBrowser for help on using the repository browser.