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