/* $NetBSD: ldscript.evbarm,v 1.8 2014/01/30 15:36:44 matt Exp $ */ OUTPUT_ARCH(arm) ENTRY(KERNEL_BASE_phys) SECTIONS { KERNEL_BASE_phys = @KERNEL_BASE_PHYS@; KERNEL_BASE_virt = @KERNEL_BASE_VIRT@; /* Kernel start: */ .start (KERNEL_BASE_phys) : { *(.start) } =0 /* Read-only sections, merged into text segment: */ .text (KERNEL_BASE_virt + SIZEOF(.start)) : AT (LOADADDR(.start) + SIZEOF(.start)) { *(.text) *(.text.*) *(.stub) *(.glue_7t) *(.glue_7) *(.rodata) *(.rodata.*) } =0 .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } PROVIDE (__exidx_start = .); .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } PROVIDE (__exidx_end = .); PROVIDE (__etext = .); PROVIDE (_etext = .); PROVIDE (etext = .); /* Adjust the address for the data segment to start on the next large page boundary. */ . = ALIGN(0x10000); .data : AT (LOADADDR(.text) + (ADDR(.data) - ADDR(.text))) { __data_start = . ; *(.data) *(.data.*) } .sdata : AT (LOADADDR(.data) + (ADDR(.sdata) - ADDR(.data))) { *(.sdata) *(.sdata.*) } . = ALIGN(8); _edata = .; PROVIDE (edata = .); __bss_start = .; __bss_start__ = .; .sbss : AT (LOADADDR(.sdata) + (ADDR(.sbss) - ADDR(.sdata))) { PROVIDE (__sbss_start = .); PROVIDE (___sbss_start = .); *(.dynsbss) *(.sbss) *(.sbss.*) *(.scommon) PROVIDE (__sbss_end = .); PROVIDE (___sbss_end = .); } .bss : AT (LOADADDR(.sbss) + (ADDR(.bss) - ADDR(.sbss))) { *(.dynbss) *(.bss) *(.bss.*) *(COMMON) /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the .bss section disappears because there are no input sections. */ . = ALIGN(32 / 8); } . = ALIGN(32 / 8); _end = .; _bss_end__ = . ; __bss_end__ = . ; __end__ = . ; PROVIDE (end = .); }