NetBSD-5.0.2/sys/arch/amd64/conf/kern.ldscript.2MB

/*	$NetBSD: kern.ldscript.2MB,v 1.2 2007/10/18 15:28:33 yamt Exp $	*/

OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64",
	      "elf64-x86-64")
OUTPUT_ARCH(i386:x86-64)
ENTRY(_start)
SECTIONS
{
   /* Read-only sections, merged into text segment: */
   .text :
   AT (ADDR(.text))
   {
     *(.text)
     *(.text.*)
     *(.stub)
   } =0
   _etext = . ;
   PROVIDE (etext = .) ;

   .rodata :
   AT (LOADADDR(.text) + (ADDR(.rodata) - ADDR(.text)))
   {
     *(.rodata)
     *(.rodata.*)
   }
 
   /* Adjust the address for the data segment.  We push the data segment
      up to the next 2MB boundary so that we can map the text with large
      pages. */
   . = ALIGN(0x200000);
   __data_start = . ;
   .data :
   AT (LOADADDR(.text) + (ADDR(.data) - ADDR(.text)))
   {
     *(.data)
     *(.data.*)
   }
   _edata = . ;
   PROVIDE (edata = .) ;
   __bss_start = . ;
   .bss :
   AT (LOADADDR(.text) + (ADDR(.bss) - ADDR(.text)))
   {
     *(.bss)
     *(.bss.*)
     *(COMMON)
     . = ALIGN(64 / 8);
   }
   . = ALIGN(64 / 8);
  _end = . ;
  PROVIDE (end = .) ;
  .note.netbsd.ident :
  {
    KEEP(*(.note.netbsd.ident));
  }
}