1 1.4.6.1 skrll /* $NetBSD: kern.ldscript,v 1.4.6.1 2015/09/22 12:05:48 skrll Exp $ */ 2 1.1 thorpej 3 1.1 thorpej ENTRY(KERNEL_BASE_phys) 4 1.1 thorpej SECTIONS 5 1.1 thorpej { 6 1.1 thorpej /* Kernel start: */ 7 1.4.6.1 skrll .start : 8 1.1 thorpej { 9 1.1 thorpej *(.start) 10 1.4.6.1 skrll } 11 1.1 thorpej 12 1.1 thorpej /* Read-only sections, merged into text segment: */ 13 1.4.6.1 skrll .text : 14 1.1 thorpej { 15 1.1 thorpej *(.text) 16 1.1 thorpej *(.text.*) 17 1.1 thorpej *(.stub) 18 1.1 thorpej *(.glue_7t) *(.glue_7) 19 1.1 thorpej *(.rodata) *(.rodata.*) 20 1.4.6.1 skrll } 21 1.1 thorpej PROVIDE (__etext = .); 22 1.1 thorpej PROVIDE (_etext = .); 23 1.1 thorpej PROVIDE (etext = .); 24 1.1 thorpej /* Adjust the address for the data segment to start on the next page 25 1.1 thorpej boundary. */ 26 1.1 thorpej . = ALIGN(0x8000); 27 1.1 thorpej .data : 28 1.1 thorpej { 29 1.1 thorpej __data_start = . ; 30 1.1 thorpej *(.data) 31 1.1 thorpej *(.data.*) 32 1.1 thorpej } 33 1.3 uwe .sdata : 34 1.1 thorpej { 35 1.4.6.1 skrll *(.sdata) 36 1.1 thorpej *(.sdata.*) 37 1.1 thorpej } 38 1.1 thorpej _edata = .; 39 1.1 thorpej PROVIDE (edata = .); 40 1.1 thorpej __bss_start = .; 41 1.1 thorpej __bss_start__ = .; 42 1.1 thorpej .sbss : 43 1.1 thorpej { 44 1.1 thorpej PROVIDE (__sbss_start = .); 45 1.1 thorpej PROVIDE (___sbss_start = .); 46 1.1 thorpej *(.dynsbss) 47 1.1 thorpej *(.sbss) 48 1.1 thorpej *(.sbss.*) 49 1.1 thorpej *(.scommon) 50 1.1 thorpej PROVIDE (__sbss_end = .); 51 1.1 thorpej PROVIDE (___sbss_end = .); 52 1.1 thorpej } 53 1.1 thorpej .bss : 54 1.1 thorpej { 55 1.4.6.1 skrll *(.dynbss) 56 1.4.6.1 skrll *(.bss) 57 1.4.6.1 skrll *(.bss.*) 58 1.4.6.1 skrll *(COMMON) 59 1.4.6.1 skrll /* Align here to ensure that the .bss section occupies space up to 60 1.4.6.1 skrll _end. Align after .bss to ensure correct alignment even if the 61 1.4.6.1 skrll .bss section disappears because there are no input sections. */ 62 1.4.6.1 skrll . = ALIGN(32 / 8); 63 1.1 thorpej } 64 1.1 thorpej . = ALIGN(32 / 8); 65 1.1 thorpej _end = .; 66 1.1 thorpej _bss_end__ = . ; __bss_end__ = . ; __end__ = . ; 67 1.1 thorpej PROVIDE (end = .); 68 1.1 thorpej } 69 1.4.6.1 skrll SECTIONS 70 1.4.6.1 skrll { 71 1.4.6.1 skrll KERNEL_BASE_phys = 0x0000c000; 72 1.4.6.1 skrll KERNEL_BASE_virt = 0xf000c000; 73 1.4.6.1 skrll 74 1.4.6.1 skrll .start (KERNEL_BASE_phys) : 75 1.4.6.1 skrll { 76 1.4.6.1 skrll *(.start) 77 1.4.6.1 skrll } =0 78 1.4.6.1 skrll 79 1.4.6.1 skrll .text (KERNEL_BASE_virt + SIZEOF(.start)) : 80 1.4.6.1 skrll AT (LOADADDR(.start) + SIZEOF(.start)) 81 1.4.6.1 skrll { 82 1.4.6.1 skrll *(.text) 83 1.4.6.1 skrll } =0 84 1.4.6.1 skrll 85 1.4.6.1 skrll .data : 86 1.4.6.1 skrll AT (LOADADDR(.text) + (ADDR(.data) - ADDR(.text))) 87 1.4.6.1 skrll { 88 1.4.6.1 skrll *(.data) 89 1.4.6.1 skrll } 90 1.4.6.1 skrll } 91