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

Linux/Unix编程

开发平台:

Unix_Linux

  1. /* $Id: vmlinux.lds.in,v 1.5 2001/07/27 11:45:55 gniibe Exp $
  2.  * ld script to make SuperH Linux kernel
  3.  * Written by Niibe Yutaka
  4.  */
  5. #include <linux/config.h>
  6. #ifdef CONFIG_CPU_LITTLE_ENDIAN
  7. OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", "elf32-sh-linux")
  8. #else
  9. OUTPUT_FORMAT("elf32-shbig-linux", "elf32-shbig-linux", "elf32-shbig-linux")
  10. #endif
  11. OUTPUT_ARCH(sh)
  12. ENTRY(_start)
  13. SECTIONS
  14. {
  15.   . = 0x80000000 + CONFIG_MEMORY_START + 0x1000;
  16.   _text = .; /* Text and read-only data */
  17.   text = .; /* Text and read-only data */
  18.   .empty_zero_page : {
  19. *(.empty_zero_page)
  20. } = 0
  21.   .text : {
  22. *(.text)
  23. *(.fixup)
  24. *(.gnu.warning)
  25. } = 0x0009
  26.   .rodata : { *(.rodata) *(.rodata.*) }
  27.   .kstrtab : { *(.kstrtab) }
  28.   . = ALIGN(16); /* Exception table */
  29.   __start___ex_table = .;
  30.   __ex_table : { *(__ex_table) }
  31.   __stop___ex_table = .;
  32.   __start___ksymtab = .; /* Kernel symbol table */
  33.   __ksymtab : { *(__ksymtab) }
  34.   __stop___ksymtab = .;
  35.   __start___kallsyms = .; /* All kernel symbols */
  36.   __kallsyms : { *(__kallsyms) }
  37.   __stop___kallsyms = .;
  38.   _etext = .; /* End of text section */
  39.   .data : { /* Data */
  40. *(.data)
  41. CONSTRUCTORS
  42. }
  43.   _edata = .; /* End of data section */
  44.   . = ALIGN(8192); /* init_task */
  45.   .data.init_task : { *(.data.init_task) }
  46.   /* stack */
  47.   .stack : { stack = .;  _stack = .; }
  48.   . = ALIGN(4096); /* Init code and data */
  49.   __init_begin = .;
  50.   .text.init : { *(.text.init) }
  51.   .data.init : { *(.data.init) }
  52.   . = ALIGN(16);
  53.   __setup_start = .;
  54.   .setup.init : { *(.setup.init) }
  55.   __setup_end = .;
  56.   __initcall_start = .;
  57.   .initcall.init : { *(.initcall.init) }
  58.   __initcall_end = .;
  59.   __machvec_start = .;
  60.   .machvec.init : { *(.machvec.init) }
  61.   __machvec_end = .;
  62.   . = ALIGN(4096);
  63.   __init_end = .;
  64.   . = ALIGN(4096);
  65.   .data.page_aligned : { *(.data.idt) }
  66. #ifdef CONFIG_CPU_SH3
  67.   . = ALIGN(16);
  68. #else
  69.   . = ALIGN(32);
  70. #endif
  71.   .data.cacheline_aligned : { *(.data.cacheline_aligned) }
  72.   . = ALIGN(4);
  73.   __bss_start = .; /* BSS */
  74.   .bss : {
  75. *(.bss)
  76. }
  77.   . = ALIGN(4);
  78.   _end = . ;
  79.   /* When something in the kernel is NOT compiled as a module, the
  80.    * module cleanup code and data are put into these segments.  Both
  81.    * can then be thrown away, as cleanup code is never called unless
  82.    * it's a module.
  83.    */
  84.   /DISCARD/ : {
  85. *(.text.exit)
  86. *(.data.exit)
  87. *(.exitcall.exit)
  88. }
  89.   /* Stabs debugging sections.  */
  90.   .stab 0 : { *(.stab) }
  91.   .stabstr 0 : { *(.stabstr) }
  92.   .stab.excl 0 : { *(.stab.excl) }
  93.   .stab.exclstr 0 : { *(.stab.exclstr) }
  94.   .stab.index 0 : { *(.stab.index) }
  95.   .stab.indexstr 0 : { *(.stab.indexstr) }
  96.   .comment 0 : { *(.comment) }
  97.   /* DWARF debug sections.
  98.      Symbols in the DWARF debugging section are relative to the beginning
  99.      of the section so we begin .debug at 0.  */
  100.   /* DWARF 1 */
  101.   .debug          0 : { *(.debug) }
  102.   .line           0 : { *(.line) }
  103.   /* GNU DWARF 1 extensions */
  104.   .debug_srcinfo  0 : { *(.debug_srcinfo) }
  105.   .debug_sfnames  0 : { *(.debug_sfnames) }
  106.   /* DWARF 1.1 and DWARF 2 */
  107.   .debug_aranges  0 : { *(.debug_aranges) }
  108.   .debug_pubnames 0 : { *(.debug_pubnames) }
  109.   /* DWARF 2 */
  110.   .debug_info     0 : { *(.debug_info) }
  111.   .debug_abbrev   0 : { *(.debug_abbrev) }
  112.   .debug_line     0 : { *(.debug_line) }
  113.   .debug_frame    0 : { *(.debug_frame) }
  114.   .debug_str      0 : { *(.debug_str) }
  115.   .debug_loc      0 : { *(.debug_loc) }
  116.   .debug_macinfo  0 : { *(.debug_macinfo) }
  117.   /* SGI/MIPS DWARF 2 extensions */
  118.   .debug_weaknames 0 : { *(.debug_weaknames) }
  119.   .debug_funcnames 0 : { *(.debug_funcnames) }
  120.   .debug_typenames 0 : { *(.debug_typenames) }
  121.   .debug_varnames  0 : { *(.debug_varnames) }
  122.   /* These must appear regardless of  .  */
  123. }