vmlinux.lds.S 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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. ebp_start = .;
  17. /* The boot section is only necessary until the VCS top level testbench */
  18. /* includes both flash and DRAM. */
  19. .boot : { *(.boot) }
  20. . = DRAM_VIRTUAL_BASE + 0x4000; /* See head.S and pages reserved at the start. */
  21. _text = .; /* Text and read-only data. */
  22. text_start = .; /* Lots of aliases. */
  23. _stext = .;
  24. __stext = .;
  25. .text : {
  26. *(.text)
  27. SCHED_TEXT
  28. LOCK_TEXT
  29. *(.fixup)
  30. *(.text.__*)
  31. }
  32. _etext = . ; /* End of text section. */
  33. __etext = .;
  34. . = ALIGN(4); /* Exception table. */
  35. __start___ex_table = .;
  36. __ex_table : { *(__ex_table) }
  37. __stop___ex_table = .;
  38. RODATA
  39. . = ALIGN (4);
  40. ___data_start = . ;
  41. __Sdata = . ;
  42. .data : { /* Data */
  43. *(.data)
  44. }
  45. __edata = . ; /* End of data section. */
  46. _edata = . ;
  47. . = ALIGN(8192); /* init_task and stack, must be aligned. */
  48. .data.init_task : { *(.data.init_task) }
  49. . = ALIGN(8192); /* Init code and data. */
  50. __init_begin = .;
  51. .init.text : {
  52. _sinittext = .;
  53. *(.init.text)
  54. _einittext = .;
  55. }
  56. .init.data : { *(.init.data) }
  57. . = ALIGN(16);
  58. __setup_start = .;
  59. .init.setup : { *(.init.setup) }
  60. __setup_end = .;
  61. __start___param = .;
  62. __param : { *(__param) }
  63. __stop___param = .;
  64. .initcall.init : {
  65. __initcall_start = .;
  66. *(.initcall1.init);
  67. *(.initcall2.init);
  68. *(.initcall3.init);
  69. *(.initcall4.init);
  70. *(.initcall5.init);
  71. *(.initcall6.init);
  72. *(.initcall7.init);
  73. __initcall_end = .;
  74. }
  75. .con_initcall.init : {
  76. __con_initcall_start = .;
  77. *(.con_initcall.init)
  78. __con_initcall_end = .;
  79. }
  80. SECURITY_INIT
  81. __per_cpu_start = .;
  82. .data.percpu : { *(.data.percpu) }
  83. __per_cpu_end = .;
  84. .init.ramfs : {
  85. __initramfs_start = .;
  86. *(.init.ramfs)
  87. __initramfs_end = .;
  88. /*
  89. * We fill to the next page, so we can discard all init
  90. * pages without needing to consider what payload might be
  91. * appended to the kernel image.
  92. */
  93. FILL (0);
  94. . = ALIGN (8192);
  95. }
  96. __vmlinux_end = .; /* Last address of the physical file. */
  97. __init_end = .;
  98. __data_end = . ; /* Move to _edata? */
  99. __bss_start = .; /* BSS. */
  100. .bss : {
  101. *(COMMON)
  102. *(.bss)
  103. }
  104. . = ALIGN (0x20);
  105. _end = .;
  106. __end = .;
  107. /* Sections to be discarded */
  108. /DISCARD/ : {
  109. *(.text.exit)
  110. *(.data.exit)
  111. *(.exitcall.exit)
  112. }
  113. dram_end = dram_start + CONFIG_ETRAX_DRAM_SIZE*1024*1024;
  114. }