vmlinux.lds.S 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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 <linux/config.h>
  11. #include <asm-generic/vmlinux.lds.h>
  12. jiffies = jiffies_64;
  13. SECTIONS
  14. {
  15. . = DRAM_VIRTUAL_BASE;
  16. dram_start = .;
  17. ibr_start = .;
  18. . = . + 0x4000; /* see head.S and pages reserved at the start */
  19. _text = .; /* Text and read-only data */
  20. text_start = .; /* lots of aliases */
  21. _stext = .;
  22. __stext = .;
  23. .text : {
  24. *(.text)
  25. SCHED_TEXT
  26. LOCK_TEXT
  27. *(.fixup)
  28. *(.text.__*)
  29. }
  30. _etext = . ; /* End of text section */
  31. __etext = .;
  32. . = ALIGN(4); /* Exception table */
  33. __start___ex_table = .;
  34. __ex_table : { *(__ex_table) }
  35. __stop___ex_table = .;
  36. RODATA
  37. . = ALIGN (4);
  38. ___data_start = . ;
  39. __Sdata = . ;
  40. .data : { /* Data */
  41. *(.data)
  42. }
  43. __edata = . ; /* End of data section */
  44. _edata = . ;
  45. . = ALIGN(8192); /* init_task and stack, must be aligned */
  46. .data.init_task : { *(.data.init_task) }
  47. . = ALIGN(8192); /* Init code and data */
  48. __init_begin = .;
  49. .init.text : {
  50. _sinittext = .;
  51. *(.init.text)
  52. _einittext = .;
  53. }
  54. .init.data : { *(.init.data) }
  55. . = ALIGN(16);
  56. __setup_start = .;
  57. .init.setup : { *(.init.setup) }
  58. __setup_end = .;
  59. .initcall.init : {
  60. __initcall_start = .;
  61. *(.initcall1.init);
  62. *(.initcall2.init);
  63. *(.initcall3.init);
  64. *(.initcall4.init);
  65. *(.initcall5.init);
  66. *(.initcall6.init);
  67. *(.initcall7.init);
  68. __initcall_end = .;
  69. }
  70. .con_initcall.init : {
  71. __con_initcall_start = .;
  72. *(.con_initcall.init)
  73. __con_initcall_end = .;
  74. }
  75. SECURITY_INIT
  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. __vmlinux_end = .; /* last address of the physical file */
  87. __init_end = .;
  88. __data_end = . ; /* Move to _edata ? */
  89. __bss_start = .; /* BSS */
  90. .bss : {
  91. *(COMMON)
  92. *(.bss)
  93. }
  94. . = ALIGN (0x20);
  95. _end = .;
  96. __end = .;
  97. /* Sections to be discarded */
  98. /DISCARD/ : {
  99. *(.text.exit)
  100. *(.data.exit)
  101. *(.exitcall.exit)
  102. }
  103. dram_end = dram_start + CONFIG_ETRAX_DRAM_SIZE*1024*1024;
  104. }