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