1*2302e4a6Smlelstv/* $NetBSD: ldscript.epoc32,v 1.8 2023/02/11 22:42:20 mlelstv Exp $ */ 268122621Skiyohara 368122621SkiyoharaENTRY(KERNEL_BASE_phys) 468122621SkiyoharaSECTIONS 568122621Skiyohara{ 6*2302e4a6Smlelstv KERNEL_BASE_phys = @KERNEL_BASE_PHYS@; 7*2302e4a6Smlelstv KERNEL_BASE_virt = @KERNEL_BASE_VIRT@; 8*2302e4a6Smlelstv 968122621Skiyohara /* Kernel start: */ 10*2302e4a6Smlelstv .start (KERNEL_BASE_phys) : 1168122621Skiyohara { 1268122621Skiyohara *(.start) 1359e403c9Suebayasi } 1468122621Skiyohara 1568122621Skiyohara /* Read-only sections, merged into text segment: */ 16*2302e4a6Smlelstv .text (KERNEL_BASE_virt + SIZEOF(.start)) : 17*2302e4a6Smlelstv AT (LOADADDR(.start) + SIZEOF(.start)) 1868122621Skiyohara { 1968122621Skiyohara *(.text) 2068122621Skiyohara *(.text.*) 2168122621Skiyohara *(.stub) 2268122621Skiyohara *(.glue_7t) *(.glue_7) 2368122621Skiyohara *(.rodata) *(.rodata.*) 2459e403c9Suebayasi } 2568122621Skiyohara PROVIDE (__etext = .); 2668122621Skiyohara PROVIDE (_etext = .); 2768122621Skiyohara PROVIDE (etext = .); 2868122621Skiyohara /* Adjust the address for the data segment to start on the next page 2968122621Skiyohara boundary. */ 3068122621Skiyohara . = ALIGN(0x8000); 3168122621Skiyohara .data : 3268122621Skiyohara { 3368122621Skiyohara __data_start = . ; 3468122621Skiyohara *(.data) 3568122621Skiyohara *(.data.*) 3668122621Skiyohara } 3768122621Skiyohara .sdata : 3868122621Skiyohara { 3968122621Skiyohara *(.sdata) 4068122621Skiyohara *(.sdata.*) 4168122621Skiyohara } 4268122621Skiyohara _edata = .; 4368122621Skiyohara PROVIDE (edata = .); 4468122621Skiyohara __bss_start = .; 4568122621Skiyohara __bss_start__ = .; 4668122621Skiyohara .sbss : 4768122621Skiyohara { 4868122621Skiyohara PROVIDE (__sbss_start = .); 4968122621Skiyohara PROVIDE (___sbss_start = .); 5068122621Skiyohara *(.dynsbss) 5168122621Skiyohara *(.sbss) 5268122621Skiyohara *(.sbss.*) 5368122621Skiyohara *(.scommon) 5468122621Skiyohara PROVIDE (__sbss_end = .); 5568122621Skiyohara PROVIDE (___sbss_end = .); 5668122621Skiyohara } 5768122621Skiyohara .bss : 5868122621Skiyohara { 5968122621Skiyohara *(.dynbss) 6068122621Skiyohara *(.bss) 6168122621Skiyohara *(.bss.*) 6268122621Skiyohara *(COMMON) 6368122621Skiyohara /* Align here to ensure that the .bss section occupies space up to 6468122621Skiyohara _end. Align after .bss to ensure correct alignment even if the 6568122621Skiyohara .bss section disappears because there are no input sections. */ 6668122621Skiyohara . = ALIGN(32 / 8); 6768122621Skiyohara } 6868122621Skiyohara . = ALIGN(32 / 8); 6968122621Skiyohara _end = .; 7068122621Skiyohara _bss_end__ = . ; __bss_end__ = . ; __end__ = . ; 7168122621Skiyohara PROVIDE (end = .); 7268122621Skiyohara .note.netbsd.ident : 7368122621Skiyohara { 7468122621Skiyohara KEEP(*(.note.netbsd.ident)); 7568122621Skiyohara } 7668122621Skiyohara} 77