source: mainline/boot/arch/riscv64/_link.ld.in

Last change on this file was c89ae25, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 21 months ago

Fix and enable —gc-sections in /kernel and /boot

  • Property mode set to 100644
File size: 731 bytes
Line 
1#include <arch/arch.h>
2
3ENTRY(start)
4
5SECTIONS {
6 . = PHYSMEM_START;
7
8 .text : {
9 loader_start = .;
10 KEEP(*(BOOTSTRAP));
11 *(.text .text.*);
12 }
13
14 . = ALIGN(0x1000);
15 .htif : {
16 htif_page = .;
17 *(.htif)
18 }
19 . = ALIGN(0x1000);
20
21 . = ALIGN(0x1000);
22 .pt : {
23 pt_page = .;
24 *(.pt)
25 }
26 . = ALIGN(0x1000);
27
28 .data : {
29 *(.data .data.*); /* initialized data */
30 *(.rodata .rodata.*);
31 *(.sdata .sdata.*);
32 *(.sbss .sbss.*);
33 *(.scommon .scommon.*);
34 *(.bss .bss.*); /* uninitialized static variables */
35 *(COMMON); /* global variables */
36 loader_end = .;
37 payload_start = .;
38 KEEP(*(.payload));
39 payload_end = .;
40 }
41
42 /DISCARD/ : {
43 *(.gnu.*);
44 *(.mdebug*);
45 *(.pdr);
46 *(.comment);
47 *(.note);
48 }
49}
Note: See TracBrowser for help on using the repository browser.