vmlinux.lds.S 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. /* ld script to make the Linux/CRIS kernel
  2. * Authors: Bjorn Wesen (bjornw@axis.com)
  3. *
  4. * It is VERY DANGEROUS to fiddle around with the symbols in this
  5. * script. It is for example quite vital that all generated sections
  6. * that are used are actually named here, otherwise the linker will
  7. * put them at the end, where the init stuff is which is FREED after
  8. * the kernel has booted.
  9. */
  10. #include <asm-generic/vmlinux.lds.h>
  11. jiffies = jiffies_64;
  12. SECTIONS
  13. {
  14. . = DRAM_VIRTUAL_BASE;
  15. dram_start = .;
  16. ibr_start = .;
  17. . = . + 0x4000; /* see head.S and pages reserved at the start */
  18. _text = .; /* Text and read-only data */
  19. text_start = .; /* lots of aliases */
  20. _stext = .;
  21. __stext = .;
  22. .text : {
  23. *(.text)
  24. SCHED_TEXT
  25. LOCK_TEXT
  26. *(.fixup)
  27. *(.text.__*)
  28. }
  29. _etext = . ; /* End of text section */
  30. __etext = .;
  31. . = ALIGN(4); /* Exception table */
  32. __start___ex_table = .;
  33. __ex_table : { *(__ex_table) }
  34. __stop___ex_table = .;
  35. RODATA
  36. . = ALIGN (4);
  37. ___data_start = . ;
  38. __Sdata = . ;
  39. .data : { /* Data */
  40. DATA_DATA
  41. }
  42. __edata = . ; /* End of data section */
  43. _edata = . ;
  44. . = ALIGN(8192); /* init_task and stack, must be aligned */
  45. .data.init_task : { *(.data.init_task) }
  46. . = ALIGN(8192); /* Init code and data */
  47. __init_begin = .;
  48. .init.text : {
  49. _sinittext = .;
  50. *(.init.text)
  51. _einittext = .;
  52. }
  53. .init.data : { *(.init.data) }
  54. . = ALIGN(16);
  55. __setup_start = .;
  56. .init.setup : { *(.init.setup) }
  57. __setup_end = .;
  58. .initcall.init : {
  59. __initcall_start = .;
  60. *(.initcall1.init);
  61. *(.initcall2.init);
  62. *(.initcall3.init);
  63. *(.initcall4.init);
  64. *(.initcall5.init);
  65. *(.initcall6.init);
  66. *(.initcall7.init);
  67. __initcall_end = .;
  68. }
  69. .con_initcall.init : {
  70. __con_initcall_start = .;
  71. *(.con_initcall.init)
  72. __con_initcall_end = .;
  73. }
  74. SECURITY_INIT
  75. #ifdef CONFIG_BLK_DEV_INITRD
  76. .init.ramfs : {
  77. __initramfs_start = .;
  78. *(.init.ramfs)
  79. __initramfs_end = .;
  80. /* We fill to the next page, so we can discard all init
  81. pages without needing to consider what payload might be
  82. appended to the kernel image. */
  83. FILL (0);
  84. . = ALIGN (8192);
  85. }
  86. #endif
  87. __vmlinux_end = .; /* last address of the physical file */
  88. __init_end = .;
  89. __data_end = . ; /* Move to _edata ? */
  90. __bss_start = .; /* BSS */
  91. .bss : {
  92. *(COMMON)
  93. *(.bss)
  94. }
  95. . = ALIGN (0x20);
  96. _end = .;
  97. __end = .;
  98. /* Sections to be discarded */
  99. /DISCARD/ : {
  100. *(.text.exit)
  101. *(.data.exit)
  102. *(.exitcall.exit)
  103. }
  104. dram_end = dram_start + CONFIG_ETRAX_DRAM_SIZE*1024*1024;
  105. }