vmlinux.lds.S
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:5k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. #include <linux/config.h>
  2. #include <asm/cache.h>
  3. #include <asm/page.h>
  4. #include <asm/system.h>
  5. OUTPUT_FORMAT("elf64-ia64-little")
  6. OUTPUT_ARCH(ia64)
  7. ENTRY(phys_start)
  8. SECTIONS
  9. {
  10.   /* Sections to be discarded */
  11.   /DISCARD/ : {
  12. *(.text.exit)
  13. *(.data.exit)
  14. *(.exitcall.exit)
  15. *(.IA_64.unwind.text.exit)
  16. *(.IA_64.unwind_info.text.exit)
  17. }
  18.   v = PAGE_OFFSET; /* this symbol is here to make debugging easier... */
  19.   phys_start = _start - PAGE_OFFSET;
  20.   . = KERNEL_START;
  21.   _text = .;
  22.   _stext = .;
  23.   .text : AT(ADDR(.text) - PAGE_OFFSET)
  24.     {
  25. *(.text.ivt)
  26. *(.text)
  27.     }
  28.   .text2 : AT(ADDR(.text2) - PAGE_OFFSET)
  29. { *(.text2) }
  30. #ifdef CONFIG_SMP
  31.   .text.lock : AT(ADDR(.text.lock) - PAGE_OFFSET)
  32. { *(.text.lock) }
  33. #endif
  34.   _etext = .;
  35.   /* Read-only data */
  36.   /* Global data */
  37.   _data = .;
  38.   /* Exception table */
  39.   . = ALIGN(16);
  40.   __start___ex_table = .;
  41.   __ex_table : AT(ADDR(__ex_table) - PAGE_OFFSET)
  42. { *(__ex_table) }
  43.   __stop___ex_table = .;
  44. #if defined(CONFIG_IA64_GENERIC)
  45.   /* Machine Vector */
  46.   . = ALIGN(16);
  47.   machvec_start = .;
  48.   .machvec : AT(ADDR(.machvec) - PAGE_OFFSET)
  49. { *(.machvec) }
  50.   machvec_end = .;
  51. #endif
  52.   __start___ksymtab = .; /* Kernel symbol table */
  53.   __ksymtab : AT(ADDR(__ksymtab) - PAGE_OFFSET)
  54. { *(__ksymtab) }
  55.   __stop___ksymtab = .;
  56.   __start___kallsyms = .; /* All kernel symbols for debugging */
  57.   __kallsyms : AT(ADDR(__kallsyms) - PAGE_OFFSET)
  58. { *(__kallsyms) }
  59.   __stop___kallsyms = .;
  60.   /* Unwind info & table: */
  61.   . = ALIGN(8);
  62.   .IA_64.unwind_info : AT(ADDR(.IA_64.unwind_info) - PAGE_OFFSET)
  63. { *(.IA_64.unwind_info*) }
  64.   ia64_unw_start = .;
  65.   .IA_64.unwind : AT(ADDR(.IA_64.unwind) - PAGE_OFFSET)
  66. { *(.IA_64.unwind*) }
  67.   ia64_unw_end = .;
  68.   .rodata : AT(ADDR(.rodata) - PAGE_OFFSET)
  69. { *(.rodata) *(.rodata.*) }
  70.   .kstrtab : AT(ADDR(.kstrtab) - PAGE_OFFSET)
  71. { *(.kstrtab) }
  72.   .opd : AT(ADDR(.opd) - PAGE_OFFSET)
  73. { *(.opd) }
  74.   /* Initialization code and data: */
  75.   . = ALIGN(PAGE_SIZE);
  76.   __init_begin = .;
  77.   .text.init : AT(ADDR(.text.init) - PAGE_OFFSET)
  78. { *(.text.init) }
  79.   .data.init : AT(ADDR(.data.init) - PAGE_OFFSET)
  80. { *(.data.init) }
  81.    . = ALIGN(16);
  82.   __setup_start = .;
  83.   .setup.init : AT(ADDR(.setup.init) - PAGE_OFFSET)
  84.         { *(.setup.init) }
  85.   __setup_end = .;
  86.   __initcall_start = .;
  87.   .initcall.init : AT(ADDR(.initcall.init) - PAGE_OFFSET)
  88.         { *(.initcall.init) }
  89.   __initcall_end = .;
  90.   . = ALIGN(PAGE_SIZE);
  91.   __init_end = .;
  92.   /* The initial task and kernel stack */
  93.   init_task : AT(ADDR(init_task) - PAGE_OFFSET)
  94. { *(init_task) }
  95.   .data.page_aligned : AT(ADDR(.data.page_aligned) - PAGE_OFFSET)
  96.         { *(__special_page_section)
  97.   __start_gate_section = .;
  98.   *(.text.gate)
  99.   __stop_gate_section = .;
  100. }
  101.   . = ALIGN(SMP_CACHE_BYTES);
  102.   .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - PAGE_OFFSET)
  103.         { *(.data.cacheline_aligned) }
  104.   /* Kernel symbol names for modules: */
  105.   .kstrtab : AT(ADDR(.kstrtab) - PAGE_OFFSET)
  106. { *(.kstrtab) }
  107.   .data : AT(ADDR(.data) - PAGE_OFFSET)
  108. { *(.data) *(.gnu.linkonce.d*) CONSTRUCTORS }
  109.   . = ALIGN(16);
  110.   __gp = . + 0x200000; /* gp must be 16-byte aligned for exc. table */
  111.   .got : AT(ADDR(.got) - PAGE_OFFSET)
  112. { *(.got.plt) *(.got) }
  113.   /* We want the small data sections together, so single-instruction offsets
  114.      can access them all, and initialized data all before uninitialized, so
  115.      we can shorten the on-disk segment size.  */
  116.   .sdata : AT(ADDR(.sdata) - PAGE_OFFSET)
  117. { *(.sdata) }
  118.   _edata  =  .;
  119.   _bss = .;
  120.   .sbss : AT(ADDR(.sbss) - PAGE_OFFSET)
  121. { *(.sbss) *(.scommon) }
  122.   .bss : AT(ADDR(.bss) - PAGE_OFFSET)
  123. { *(.bss) *(COMMON) }
  124.   . = ALIGN(64 / 8);
  125.   _end = .;
  126.   /* Stabs debugging sections.  */
  127.   .stab 0 : { *(.stab) }
  128.   .stabstr 0 : { *(.stabstr) }
  129.   .stab.excl 0 : { *(.stab.excl) }
  130.   .stab.exclstr 0 : { *(.stab.exclstr) }
  131.   .stab.index 0 : { *(.stab.index) }
  132.   .stab.indexstr 0 : { *(.stab.indexstr) }
  133.   /* DWARF debug sections.
  134.      Symbols in the DWARF debugging sections are relative to the beginning
  135.      of the section so we begin them at 0.  */
  136.   /* DWARF 1 */
  137.   .debug          0 : { *(.debug) }
  138.   .line           0 : { *(.line) }
  139.   /* GNU DWARF 1 extensions */
  140.   .debug_srcinfo  0 : { *(.debug_srcinfo) }
  141.   .debug_sfnames  0 : { *(.debug_sfnames) }
  142.   /* DWARF 1.1 and DWARF 2 */
  143.   .debug_aranges  0 : { *(.debug_aranges) }
  144.   .debug_pubnames 0 : { *(.debug_pubnames) }
  145.   /* DWARF 2 */
  146.   .debug_info     0 : { *(.debug_info) }
  147.   .debug_abbrev   0 : { *(.debug_abbrev) }
  148.   .debug_line     0 : { *(.debug_line) }
  149.   .debug_frame    0 : { *(.debug_frame) }
  150.   .debug_str      0 : { *(.debug_str) }
  151.   .debug_loc      0 : { *(.debug_loc) }
  152.   .debug_macinfo  0 : { *(.debug_macinfo) }
  153.   /* SGI/MIPS DWARF 2 extensions */
  154.   .debug_weaknames 0 : { *(.debug_weaknames) }
  155.   .debug_funcnames 0 : { *(.debug_funcnames) }
  156.   .debug_typenames 0 : { *(.debug_typenames) }
  157.   .debug_varnames  0 : { *(.debug_varnames) }
  158.   /* These must appear regardless of  .  */
  159.   /* Discard them for now since Intel SoftSDV cannot handle them.
  160.   .comment 0 : { *(.comment) }
  161.   .note 0 : { *(.note) }
  162.   */
  163.   /DISCARD/ : { *(.comment) }
  164.   /DISCARD/ : { *(.note) }
  165. }