Rev 1852 | Rev 2089 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
455 | decky | 1 | /** SPARC64 linker script |
418 | jermar | 2 | * |
3 | * It is ELF format, but its only section looks like this: |
||
4 | * kernel text |
||
5 | * kernel data |
||
6 | * |
||
7 | */ |
||
8 | |||
1790 | jermar | 9 | #define __LINKER__ |
846 | jermar | 10 | #include <arch/boot/boot.h> |
455 | decky | 11 | |
418 | jermar | 12 | ENTRY(kernel_image_start) |
13 | |||
14 | SECTIONS { |
||
846 | jermar | 15 | .image VMA: AT (LMA) { |
418 | jermar | 16 | ktext_start = .; |
17 | *(K_TEXT_START) |
||
18 | *(.text); |
||
19 | ktext_end = .; |
||
20 | |||
21 | kdata_start = .; |
||
22 | *(K_DATA_START) |
||
23 | *(.rodata); |
||
24 | *(.rodata.*); |
||
25 | *(.data); /* initialized data */ |
||
26 | *(.sdata); |
||
27 | *(.sdata2); |
||
28 | *(.sbss); |
||
1852 | jermar | 29 | . = ALIGN(8); |
418 | jermar | 30 | hardcoded_ktext_size = .; |
820 | jermar | 31 | QUAD(ktext_end - ktext_start); |
418 | jermar | 32 | hardcoded_kdata_size = .; |
820 | jermar | 33 | QUAD(kdata_end - kdata_start); |
418 | jermar | 34 | hardcoded_load_address = .; |
846 | jermar | 35 | QUAD(VMA); |
418 | jermar | 36 | *(.bss); /* uninitialized static variables */ |
37 | *(COMMON); /* global variables */ |
||
38 | |||
39 | symbol_table = .; |
||
40 | *(symtab.*); /* Symbol table, must be LAST symbol!*/ |
||
41 | |||
42 | kdata_end = .; |
||
43 | } |
||
420 | jermar | 44 | |
45 | /DISCARD/ : { |
||
1880 | jermar | 46 | *(*); |
420 | jermar | 47 | } |
48 | |||
418 | jermar | 49 | } |