Home | History | Annotate | Line # | Download | only in conf
kern.ldscript revision 1.4.6.1
      1  1.4.6.1  yamt /* $NetBSD: kern.ldscript,v 1.4.6.1 2014/05/22 11:40:03 yamt Exp $ */
      2      1.2  matt 
      3  1.4.6.1  yamt /*  ldscript for NetBSD/powerpc kernels and LKMs, based on elf32ppc.x */
      4  1.4.6.1  yamt OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc",
      5  1.4.6.1  yamt 	      "elf32-powerpc")
      6  1.4.6.1  yamt OUTPUT_ARCH(powerpc:common)
      7      1.2  matt ENTRY(_start)
      8      1.2  matt SEARCH_DIR(/lib);
      9      1.2  matt /* Do we need any of these?
     10      1.2  matt    __DYNAMIC = 0;    */
     11      1.2  matt _DYNAMIC_LINK = 0;
     12      1.2  matt SECTIONS
     13      1.2  matt {
     14      1.2  matt   /*  Read-only sections, merged into text segment.  Assumes the
     15      1.2  matt       kernel Makefile sets the start address via -Ttext.  */
     16      1.2  matt   .text      :
     17      1.2  matt   {
     18      1.2  matt     _ftext = . ;
     19  1.4.6.1  yamt     PROVIDE_HIDDEN (__eprol = .);
     20      1.2  matt     *(.text)
     21  1.4.6.1  yamt     *(.text.unlikely .text.*_unlikely)
     22  1.4.6.1  yamt     *(.text.exit .text.exit.*)
     23  1.4.6.1  yamt     *(.text.startup .text.startup.*)
     24  1.4.6.1  yamt     *(.text.hot .text.hot.*)
     25  1.4.6.1  yamt     *(.text.* .gnu.linkonce.t.*)
     26      1.2  matt     __stub_start = .;
     27      1.2  matt     *(.stub)
     28      1.2  matt     __stub_end = .;
     29      1.4  matt     __stub_pmap_start = .;
     30      1.4  matt     *(.stub.pmap)
     31      1.4  matt     __stub_pmap_end = .;
     32  1.4.6.1  yamt     /* .gnu.warning sections are handled specially by elf32.em.  */
     33      1.2  matt     *(.gnu.warning)
     34  1.4.6.1  yamt     *(.glink)
     35      1.2  matt   } =0
     36      1.2  matt   _etext = .;
     37  1.4.6.1  yamt   PROVIDE (__etext = .);
     38  1.4.6.1  yamt   PROVIDE (_etext = .);
     39      1.2  matt   PROVIDE (etext = .);
     40  1.4.6.1  yamt   .rodata         : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
     41  1.4.6.1  yamt   .rodata1        : { *(.rodata1) }
     42  1.4.6.1  yamt   .sdata2         :
     43  1.4.6.1  yamt   {
     44  1.4.6.1  yamt     PROVIDE (_SDA2_BASE_ = 32768);
     45  1.4.6.1  yamt     *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
     46  1.4.6.1  yamt   }
     47  1.4.6.1  yamt   .sbss2          : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) }
     48  1.4.6.1  yamt   /*.jcr            : { KEEP (*(.jcr)) } */ /* XXX??? */
     49      1.2  matt   .reginfo : { *(.reginfo) }
     50      1.2  matt /*  . = . + 0x1000; */
     51  1.4.6.1  yamt   .data           :
     52      1.2  matt   {
     53      1.2  matt     _fdata = . ;
     54  1.4.6.1  yamt     *(.data .data.* .gnu.linkonce.d.*)
     55  1.4.6.1  yamt     SORT(CONSTRUCTORS)
     56      1.2  matt   }
     57  1.4.6.1  yamt   .data1          : { *(.data1) }
     58      1.3  matt   . = ALIGN(32);	/* COHERENCY UNIT */
     59      1.3  matt   .data.cacheline_aligned	: { *(.data.cacheline_aligned) }
     60      1.3  matt   . = ALIGN(32);	/* COHERENCY UNIT */
     61      1.3  matt   .data.read_mostly		: { *(.data.read_mostly) }
     62      1.3  matt   . = ALIGN(32);	/* COHERENCY UNIT */
     63      1.2  matt   _gp = ALIGN(16) + 0x7ff0;
     64      1.2  matt   .lit8 : { *(.lit8) }
     65      1.2  matt   .lit4 : { *(.lit4) }
     66  1.4.6.1  yamt   .sdata          :
     67  1.4.6.1  yamt   {
     68  1.4.6.1  yamt     PROVIDE (_SDA_BASE_ = 32768);
     69  1.4.6.1  yamt     *(.sdata .sdata.* .gnu.linkonce.s.*)
     70  1.4.6.1  yamt   }
     71  1.4.6.1  yamt   _edata = .; PROVIDE (edata = .);
     72  1.4.6.1  yamt   . = .;
     73      1.2  matt   __bss_start = .;
     74      1.2  matt   _fbss = .;
     75  1.4.6.1  yamt   .sbss           :
     76      1.2  matt   {
     77  1.4.6.1  yamt     PROVIDE (__sbss_start = .); PROVIDE (___sbss_start = .);
     78  1.4.6.1  yamt     *(.dynsbss)
     79  1.4.6.1  yamt     *(.sbss .sbss.* .gnu.linkonce.sb.*)
     80  1.4.6.1  yamt     *(.scommon)
     81  1.4.6.1  yamt     PROVIDE (__sbss_end = .); PROVIDE (___sbss_end = .);
     82  1.4.6.1  yamt   }
     83  1.4.6.1  yamt   .bss            :
     84  1.4.6.1  yamt   {
     85  1.4.6.1  yamt    *(.dynbss)
     86  1.4.6.1  yamt    *(.bss .bss.* .gnu.linkonce.b.*)
     87      1.2  matt    *(COMMON)
     88  1.4.6.1  yamt    /* Align here to ensure that the .bss section occupies space up to
     89  1.4.6.1  yamt       _end.  Align after .bss to ensure correct alignment even if the
     90  1.4.6.1  yamt       .bss section disappears because there are no input sections.
     91  1.4.6.1  yamt       FIXME: Why do we need it? When there is no .bss section, we don't
     92  1.4.6.1  yamt       pad the .data section.  */
     93  1.4.6.1  yamt    . = ALIGN(. != 0 ? 32 / 8 : 1);
     94      1.2  matt   }
     95  1.4.6.1  yamt   . = ALIGN(32 / 8);
     96  1.4.6.1  yamt   . = ALIGN(32 / 8);
     97  1.4.6.1  yamt   __end = .;
     98  1.4.6.1  yamt   _end = .; PROVIDE (end = .);
     99  1.4.6.1  yamt   /* . = DATA_SEGMENT_END (.); */
    100  1.4.6.1  yamt   /* Stabs debugging sections.  */
    101  1.4.6.1  yamt   .stab          0 : { *(.stab) }
    102  1.4.6.1  yamt   .stabstr       0 : { *(.stabstr) }
    103  1.4.6.1  yamt   .stab.excl     0 : { *(.stab.excl) }
    104  1.4.6.1  yamt   .stab.exclstr  0 : { *(.stab.exclstr) }
    105  1.4.6.1  yamt   .stab.index    0 : { *(.stab.index) }
    106  1.4.6.1  yamt   .stab.indexstr 0 : { *(.stab.indexstr) }
    107  1.4.6.1  yamt   .comment       0 : { *(.comment) }
    108      1.2  matt   /* DWARF debug sections.
    109  1.4.6.1  yamt      Symbols in the DWARF debugging sections are relative to the beginning
    110  1.4.6.1  yamt      of the section so we begin them at 0.  */
    111  1.4.6.1  yamt   /* DWARF 1 */
    112      1.2  matt   .debug          0 : { *(.debug) }
    113  1.4.6.1  yamt   .line           0 : { *(.line) }
    114  1.4.6.1  yamt   /* GNU DWARF 1 extensions */
    115      1.2  matt   .debug_srcinfo  0 : { *(.debug_srcinfo) }
    116  1.4.6.1  yamt   .debug_sfnames  0 : { *(.debug_sfnames) }
    117  1.4.6.1  yamt   /* DWARF 1.1 and DWARF 2 */
    118      1.2  matt   .debug_aranges  0 : { *(.debug_aranges) }
    119      1.2  matt   .debug_pubnames 0 : { *(.debug_pubnames) }
    120  1.4.6.1  yamt   /* DWARF 2 */
    121  1.4.6.1  yamt   .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
    122  1.4.6.1  yamt   .debug_abbrev   0 : { *(.debug_abbrev) }
    123  1.4.6.1  yamt   .debug_line     0 : { *(.debug_line) }
    124  1.4.6.1  yamt   .debug_frame    0 : { *(.debug_frame) }
    125  1.4.6.1  yamt   .debug_str      0 : { *(.debug_str) }
    126  1.4.6.1  yamt   .debug_loc      0 : { *(.debug_loc) }
    127  1.4.6.1  yamt   .debug_macinfo  0 : { *(.debug_macinfo) }
    128  1.4.6.1  yamt   /* SGI/MIPS DWARF 2 extensions */
    129  1.4.6.1  yamt   .debug_weaknames 0 : { *(.debug_weaknames) }
    130  1.4.6.1  yamt   .debug_funcnames 0 : { *(.debug_funcnames) }
    131  1.4.6.1  yamt   .debug_typenames 0 : { *(.debug_typenames) }
    132  1.4.6.1  yamt   .debug_varnames  0 : { *(.debug_varnames) }
    133  1.4.6.1  yamt   /* DWARF 3 */
    134  1.4.6.1  yamt   .debug_pubtypes 0 : { *(.debug_pubtypes) }
    135  1.4.6.1  yamt   .debug_ranges   0 : { *(.debug_ranges) }
    136  1.4.6.1  yamt   /* DWARF Extension.  */
    137  1.4.6.1  yamt   .debug_macro    0 : { *(.debug_macro) }
    138  1.4.6.1  yamt   .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
    139      1.2  matt   .line           0 : { *(.line) }
    140      1.2  matt   /* These must appear regardless of  .  */
    141      1.2  matt   .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
    142      1.2  matt   .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
    143      1.2  matt }
    144