kern.ldscript revision 1.1
11.1Sthorpej/* $NetBSD: kern.ldscript,v 1.1 2021/05/05 01:35:35 thorpej Exp $ */ 21.1Sthorpej 31.1Sthorpej/* 41.1Sthorpej * Linker script for the NetBSD/alpha kernel. 51.1Sthorpej * 61.1Sthorpej * This largely behaves the same as the standard elf64-alpha linker 71.1Sthorpej * script for "ld -N"; the kernel is loaded into K0SEG, so there is 81.1Sthorpej * no reason to page-align the .data segment. 91.1Sthorpej */ 101.1Sthorpej 111.1Sthorpej#include "assym.h" /* for COHERENCY_UNIT */ 121.1Sthorpej 131.1SthorpejOUTPUT_FORMAT("elf64-alpha", "elf64-alpha", 141.1Sthorpej "elf64-alpha") 151.1SthorpejOUTPUT_ARCH(alpha) 161.1SthorpejSECTIONS 171.1Sthorpej{ 181.1Sthorpej .text : 191.1Sthorpej { 201.1Sthorpej *(.text) 211.1Sthorpej *(.text.*) 221.1Sthorpej *(.stub) 231.1Sthorpej } =0x47ff041f 241.1Sthorpej _etext = . ; 251.1Sthorpej PROVIDE (etext = .); 261.1Sthorpej 271.1Sthorpej .rodata : 281.1Sthorpej { 291.1Sthorpej *(.rodata .rodata.*) 301.1Sthorpej } 311.1Sthorpej 321.1Sthorpej .data : 331.1Sthorpej { 341.1Sthorpej *(.data) 351.1Sthorpej 361.1Sthorpej . = ALIGN(COHERENCY_UNIT); 371.1Sthorpej *(.data.cacheline_aligned) 381.1Sthorpej 391.1Sthorpej . = ALIGN(COHERENCY_UNIT); 401.1Sthorpej *(.data.read_mostly) 411.1Sthorpej 421.1Sthorpej . = ALIGN(COHERENCY_UNIT); 431.1Sthorpej *(.data.*) 441.1Sthorpej } 451.1Sthorpej 461.1Sthorpej /* 471.1Sthorpej * Small-data located along side GOT and small-bss for 481.1Sthorpej * GP-relative addressing. 491.1Sthorpej */ 501.1Sthorpej 511.1Sthorpej .got : 521.1Sthorpej { 531.1Sthorpej *(.got) 541.1Sthorpej } 551.1Sthorpej 561.1Sthorpej .sdata : 571.1Sthorpej { 581.1Sthorpej *(.sdata .sdata.*) 591.1Sthorpej } 601.1Sthorpej _edata = . ; 611.1Sthorpej PROVIDE (edata = .) ; 621.1Sthorpej 631.1Sthorpej . = .; 641.1Sthorpej __bss_start = .; 651.1Sthorpej .sbss : 661.1Sthorpej { 671.1Sthorpej *(.sbss .sbss.*) 681.1Sthorpej *(.scommon) 691.1Sthorpej } 701.1Sthorpej 711.1Sthorpej .bss : 721.1Sthorpej { 731.1Sthorpej *(.bss .bss.*) 741.1Sthorpej *(COMMON) 751.1Sthorpej } 761.1Sthorpej 771.1Sthorpej /* End of the kernel image */ 781.1Sthorpej __kernel_end = . ; 791.1Sthorpej _end = . ; 801.1Sthorpej PROVIDE (end = .) ; 811.1Sthorpej 821.1Sthorpej .note.netbsd.ident : 831.1Sthorpej { 841.1Sthorpej KEEP(*(.note.netbsd.ident)); 851.1Sthorpej } 861.1Sthorpej} 87