kern.ldscript revision 1.6
11.6Sjakllsch/*	$NetBSD: kern.ldscript,v 1.6 2014/05/07 14:00:48 jakllsch Exp $	*/
21.1Sfvdl
31.1SfvdlOUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64",
41.1Sfvdl	      "elf64-x86-64")
51.1SfvdlOUTPUT_ARCH(i386:x86-64)
61.1SfvdlENTRY(_start)
71.1SfvdlSECTIONS
81.1Sfvdl{
91.2Schristos   /* Read-only sections, merged into text segment: */
101.2Schristos   .text :
111.6Sjakllsch   AT (ADDR(.text) & 0x0fffffff)
121.2Schristos   {
131.2Schristos     *(.text)
141.2Schristos     *(.text.*)
151.2Schristos     *(.stub)
161.2Schristos   } =0
171.2Schristos   _etext = . ;
181.2Schristos   PROVIDE (etext = .) ;
191.2Schristos
201.4Syamt   .rodata :
211.4Syamt   AT (LOADADDR(.text) + (ADDR(.rodata) - ADDR(.text)))
221.4Syamt   {
231.4Syamt     *(.rodata)
241.4Syamt     *(.rodata.*)
251.4Syamt   }
261.4Syamt 
271.2Schristos   /* Adjust the address for the data segment.  We want to adjust up to
281.2Schristos      the same address within the page on the next page up.  */
291.2Schristos   . = ALIGN(0x100000) + (. & (0x100000 - 1));
301.4Syamt   __data_start = . ;
311.2Schristos   .data :
321.2Schristos   AT (LOADADDR(.text) + (ADDR(.data) - ADDR(.text)))
331.2Schristos   {
341.2Schristos     *(.data)
351.2Schristos   }
361.5Smjf
371.5Smjf   . = ALIGN(64);	/* COHERENCY_UNIT */
381.5Smjf   .data.cacheline_aligned :
391.5Smjf   AT (LOADADDR(.text) + (ADDR(.data.cacheline_aligned) - ADDR(.text)))
401.5Smjf   {
411.5Smjf     *(.data.cacheline_aligned)
421.5Smjf   }
431.5Smjf   . = ALIGN(64);	/* COHERENCY_UNIT */
441.5Smjf   .data.read_mostly :
451.5Smjf   AT (LOADADDR(.text) + (ADDR(.data.read_mostly) - ADDR(.text)))
461.5Smjf   {
471.5Smjf     *(.data.read_mostly)
481.5Smjf   }
491.5Smjf   . = ALIGN(64);	/* COHERENCY_UNIT */
501.5Smjf
511.2Schristos   _edata = . ;
521.2Schristos   PROVIDE (edata = .) ;
531.2Schristos   __bss_start = . ;
541.2Schristos   .bss :
551.2Schristos   AT (LOADADDR(.text) + (ADDR(.bss) - ADDR(.text)))
561.2Schristos   {
571.2Schristos     *(.bss)
581.2Schristos     *(.bss.*)
591.2Schristos     *(COMMON)
601.2Schristos     . = ALIGN(64 / 8);
611.2Schristos   }
621.2Schristos   . = ALIGN(64 / 8);
631.2Schristos  _end = . ;
641.2Schristos  PROVIDE (end = .) ;
651.2Schristos  .note.netbsd.ident :
661.1Sfvdl  {
671.2Schristos    KEEP(*(.note.netbsd.ident));
681.1Sfvdl  }
691.1Sfvdl}
70