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