source:
mainline/kernel/arch/riscv64/_link.ld.in@
aa0fa86a
| Last change on this file since aa0fa86a was f1380b7, checked in by , 8 years ago | |
|---|---|
|
|
| File size: 892 bytes | |
| Rev | Line | |
|---|---|---|
| [8b6aa39] | 1 | /* |
| 2 | * RISC-V 64 linker script | |
| 3 | * | |
| 4 | * kernel text | |
| 5 | * kernel data | |
| 6 | * | |
| 7 | */ | |
| 8 | ||
| 9 | OUTPUT_ARCH(riscv) | |
| 10 | ENTRY(kernel_image_start) | |
| 11 | ||
| 12 | #include <arch/boot/boot.h> | |
| 13 | #include <arch/mm/page.h> | |
| 14 | ||
| 15 | SECTIONS { | |
| [d639eaa] | 16 | .image (PA2KA(BOOT_OFFSET)) : AT (0) { |
| [8b6aa39] | 17 | ktext_start = .; |
| [d639eaa] | 18 | *(K_TEXT_START); |
| [8b6aa39] | 19 | *(.text); |
| 20 | ktext_end = .; | |
| [f1380b7] | 21 | |
| [8b6aa39] | 22 | kdata_start = .; |
| 23 | *(.data); /* initialized data */ | |
| 24 | *(.rodata*); | |
| 25 | hardcoded_load_address = .; | |
| 26 | QUAD(PA2KA(BOOT_OFFSET)); | |
| 27 | hardcoded_ktext_size = .; | |
| [d639eaa] | 28 | QUAD(ktext_end - ktext_start); |
| [8b6aa39] | 29 | hardcoded_kdata_size = .; |
| [d639eaa] | 30 | QUAD(kdata_end - kdata_start); |
| [8b6aa39] | 31 | *(.sdata); |
| 32 | *(.reginfo); | |
| 33 | *(.sbss); | |
| 34 | *(.scommon); | |
| 35 | *(.bss); /* uninitialized static variables */ | |
| 36 | *(COMMON); /* global variables */ | |
| 37 | . = ALIGN(8); | |
| 38 | symbol_table = .; | |
| 39 | *(symtab.*); | |
| 40 | kdata_end = .; | |
| 41 | } | |
| [f1380b7] | 42 | |
| [8b6aa39] | 43 | /DISCARD/ : { |
| 44 | *(.mdebug*); | |
| 45 | *(.pdr); | |
| 46 | *(.comment); | |
| 47 | *(.note); | |
| 48 | } | |
| 49 | } |
Note:
See TracBrowser
for help on using the repository browser.
