Home | History | Annotate | Line # | Download | only in conf
kern.ldscript revision 1.6.6.1
      1  1.6.6.1  skrll /* $NetBSD: kern.ldscript,v 1.6.6.1 2015/09/22 12:05:49 skrll Exp $ */
      2      1.2   matt 
      3      1.6    mrg /*  ldscript for NetBSD/powerpc kernels and LKMs, based on elf32ppc.x */
      4      1.6    mrg OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc",
      5      1.6    mrg 	      "elf32-powerpc")
      6      1.6    mrg OUTPUT_ARCH(powerpc:common)
      7      1.2   matt ENTRY(_start)
      8      1.2   matt /* Do we need any of these?
      9      1.2   matt    __DYNAMIC = 0;    */
     10      1.2   matt _DYNAMIC_LINK = 0;
     11      1.2   matt SECTIONS
     12      1.2   matt {
     13      1.2   matt   /*  Read-only sections, merged into text segment.  Assumes the
     14      1.2   matt       kernel Makefile sets the start address via -Ttext.  */
     15      1.2   matt   .text      :
     16      1.2   matt   {
     17      1.2   matt     _ftext = . ;
     18      1.6    mrg     PROVIDE_HIDDEN (__eprol = .);
     19      1.2   matt     *(.text)
     20      1.6    mrg     *(.text.unlikely .text.*_unlikely)
     21      1.6    mrg     *(.text.exit .text.exit.*)
     22      1.6    mrg     *(.text.startup .text.startup.*)
     23      1.6    mrg     *(.text.hot .text.hot.*)
     24      1.6    mrg     *(.text.* .gnu.linkonce.t.*)
     25      1.2   matt     __stub_start = .;
     26      1.2   matt     *(.stub)
     27      1.2   matt     __stub_end = .;
     28      1.4   matt     __stub_pmap_start = .;
     29      1.4   matt     *(.stub.pmap)
     30      1.4   matt     __stub_pmap_end = .;
     31      1.6    mrg     /* .gnu.warning sections are handled specially by elf32.em.  */
     32      1.2   matt     *(.gnu.warning)
     33      1.6    mrg     *(.glink)
     34      1.2   matt   } =0
     35      1.2   matt   _etext = .;
     36      1.6    mrg   PROVIDE (__etext = .);
     37      1.6    mrg   PROVIDE (_etext = .);
     38      1.2   matt   PROVIDE (etext = .);
     39      1.6    mrg   .rodata         : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
     40      1.6    mrg   .rodata1        : { *(.rodata1) }
     41      1.6    mrg   .sdata2         :
     42      1.6    mrg   {
     43      1.6    mrg     PROVIDE (_SDA2_BASE_ = 32768);
     44      1.6    mrg     *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
     45      1.6    mrg   }
     46      1.6    mrg   .sbss2          : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) }
     47      1.6    mrg   /*.jcr            : { KEEP (*(.jcr)) } */ /* XXX??? */
     48      1.2   matt   .reginfo : { *(.reginfo) }
     49      1.2   matt /*  . = . + 0x1000; */
     50      1.6    mrg   .data           :
     51      1.2   matt   {
     52      1.2   matt     _fdata = . ;
     53      1.6    mrg     *(.data .data.* .gnu.linkonce.d.*)
     54      1.6    mrg     SORT(CONSTRUCTORS)
     55      1.2   matt   }
     56      1.6    mrg   .data1          : { *(.data1) }
     57      1.3   matt   . = ALIGN(32);	/* COHERENCY UNIT */
     58      1.3   matt   .data.cacheline_aligned	: { *(.data.cacheline_aligned) }
     59      1.3   matt   . = ALIGN(32);	/* COHERENCY UNIT */
     60      1.3   matt   .data.read_mostly		: { *(.data.read_mostly) }
     61      1.3   matt   . = ALIGN(32);	/* COHERENCY UNIT */
     62      1.2   matt   _gp = ALIGN(16) + 0x7ff0;
     63      1.2   matt   .lit8 : { *(.lit8) }
     64      1.2   matt   .lit4 : { *(.lit4) }
     65      1.6    mrg   .sdata          :
     66      1.6    mrg   {
     67      1.6    mrg     PROVIDE (_SDA_BASE_ = 32768);
     68      1.6    mrg     *(.sdata .sdata.* .gnu.linkonce.s.*)
     69      1.6    mrg   }
     70      1.6    mrg   _edata = .; PROVIDE (edata = .);
     71      1.6    mrg   . = .;
     72      1.2   matt   __bss_start = .;
     73      1.2   matt   _fbss = .;
     74      1.6    mrg   .sbss           :
     75      1.2   matt   {
     76      1.6    mrg     PROVIDE (__sbss_start = .); PROVIDE (___sbss_start = .);
     77      1.6    mrg     *(.dynsbss)
     78      1.6    mrg     *(.sbss .sbss.* .gnu.linkonce.sb.*)
     79      1.6    mrg     *(.scommon)
     80      1.6    mrg     PROVIDE (__sbss_end = .); PROVIDE (___sbss_end = .);
     81      1.6    mrg   }
     82      1.6    mrg   .bss            :
     83      1.6    mrg   {
     84  1.6.6.1  skrll     *(.dynbss)
     85  1.6.6.1  skrll     *(.bss .bss.* .gnu.linkonce.b.*)
     86  1.6.6.1  skrll     *(COMMON)
     87  1.6.6.1  skrll     /* Align here to ensure that the .bss section occupies space up to
     88  1.6.6.1  skrll        _end.  Align after .bss to ensure correct alignment even if the
     89  1.6.6.1  skrll        .bss section disappears because there are no input sections.
     90  1.6.6.1  skrll        FIXME: Why do we need it? When there is no .bss section, we don't
     91  1.6.6.1  skrll        pad the .data section.  */
     92  1.6.6.1  skrll     . = ALIGN(. != 0 ? 32 / 8 : 1);
     93      1.2   matt   }
     94      1.6    mrg   . = ALIGN(32 / 8);
     95      1.6    mrg   . = ALIGN(32 / 8);
     96      1.6    mrg   __end = .;
     97      1.6    mrg   _end = .; PROVIDE (end = .);
     98      1.6    mrg   /* . = DATA_SEGMENT_END (.); */
     99      1.2   matt }
    100