linux-old/arch/mips64/ld.script.elf32.S
<<
>>
Prefs
   1OUTPUT_ARCH(mips)
   2ENTRY(kernel_entry)
   3SECTIONS
   4{
   5  /* Read-only sections, merged into text segment: */
   6  .init          : { *(.init)           } =0
   7  .text      :
   8  {
   9    _ftext = .;
  10    *(.text)
  11    *(.rodata)
  12    *(.rodata.*)
  13    *(.rodata1)
  14    /* .gnu.warning sections are handled specially by elf32.em.  */
  15    *(.gnu.warning)
  16  } =0
  17  .kstrtab : { *(.kstrtab) }
  18
  19  . = ALIGN(16);                /* Exception table */
  20  __start___ex_table = .;
  21  __ex_table : { *(__ex_table) }
  22  __stop___ex_table = .;
  23
  24  __start___dbe_table = .;      /* Exception table for data bus errors */
  25  __dbe_table : { *(__dbe_table) }
  26  __stop___dbe_table = .;
  27
  28  __start___ksymtab = .;        /* Kernel symbol table */
  29  __ksymtab : { *(__ksymtab) }
  30  __stop___ksymtab = .;
  31
  32  _etext = .;
  33
  34  . = ALIGN(16384);
  35  . = . + MAPPED_OFFSET;        /* for CONFIG_MAPPED_KERNEL */
  36  .data.init_task : { *(.data.init_task) }
  37
  38  /* Startup code */
  39  . = ALIGN(4096);
  40  __init_begin = .;
  41  .text.init : { *(.text.init) }
  42  .data.init : { *(.data.init) }
  43  . = ALIGN(16);
  44  __setup_start = .;
  45  .setup.init : { *(.setup.init) }
  46  __setup_end = .;
  47  __initcall_start = .;
  48  .initcall.init : { *(.initcall.init) }
  49  __initcall_end = .;
  50  . = ALIGN(4096);      /* Align double page for init_task_union */
  51  __init_end = .;
  52
  53  . = ALIGN(32);
  54  .data.cacheline_aligned : { *(.data.cacheline_aligned) }
  55
  56  .fini      : { *(.fini)    } =0
  57  .reginfo : { *(.reginfo) }
  58  .options : { *(.options) }
  59  .MIPS.options : { *(.MIPS.options) }
  60  /* Adjust the address for the data segment.  We want to adjust up to
  61     the same address within the page on the next page up.  It would
  62     be more correct to do this:
  63       . = .;
  64     The current expression does not correctly handle the case of a
  65     text segment ending precisely at the end of a page; it causes the
  66     data segment to skip a page.  The above expression does not have
  67     this problem, but it will currently (2/95) cause BFD to allocate
  68     a single segment, combining both text and data, for this case.
  69     This will prevent the text segment from being shared among
  70     multiple executions of the program; I think that is more
  71     important than losing a page of the virtual address space (note
  72     that no actual memory is lost; the page which is skipped can not
  73     be referenced).  */
  74  . = .;
  75  .data    :
  76  {
  77    _fdata = . ;
  78    *(.data)
  79
  80    /* Align the initial ramdisk image (INITRD) on page boundaries. */
  81    . = ALIGN(4096);
  82    __rd_start = .;
  83    *(.initrd)
  84    . = ALIGN(4096);
  85    __rd_end = .;
  86
  87    CONSTRUCTORS
  88  }
  89  .data1   : { *(.data1) }
  90  .lit8 : { *(.lit8) }
  91  .lit4 : { *(.lit4) }
  92  .ctors         : { *(.ctors)   }
  93  .dtors         : { *(.dtors)   }
  94  .got           : { *(.got.plt) *(.got) }
  95  .dynamic       : { *(.dynamic) }
  96  /* We want the small data sections together, so single-instruction offsets
  97     can access them all, and initialized data all before uninitialized, so
  98     we can shorten the on-disk segment size.  */
  99  .sdata     : { *(.sdata) }
 100  _edata  =  .;
 101
 102  .sbss      : { *(.sbss) *(.scommon) }
 103  .bss       :
 104  {
 105   *(.dynbss)
 106   *(.bss)
 107   *(COMMON)
 108  _end = . ;
 109  }
 110
 111  /* Sections to be discarded */
 112  /DISCARD/ :
 113  {
 114        *(.text.exit)
 115        *(.data.exit)
 116        *(.exitcall.exit)
 117  }
 118
 119  /* These are needed for ELF backends which have not yet been
 120     converted to the new style linker.  */
 121  .stab 0 : { *(.stab) }
 122  .stabstr 0 : { *(.stabstr) }
 123  /* DWARF debug sections.
 124     Symbols in the .debug DWARF section are relative to the beginning of the
 125     section so we begin .debug at 0.  It's not clear yet what needs to happen
 126     for the others.   */
 127  .debug          0 : { *(.debug) }
 128  .debug_srcinfo  0 : { *(.debug_srcinfo) }
 129  .debug_aranges  0 : { *(.debug_aranges) }
 130  .debug_pubnames 0 : { *(.debug_pubnames) }
 131  .debug_sfnames  0 : { *(.debug_sfnames) }
 132  .line           0 : { *(.line) }
 133  /* These must appear regardless of  .  */
 134  .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
 135  .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
 136}
 137
lxr.linux.no kindly hosted by Redpill Linpro AS, provider of Linux consulting and operations services since 1995.