vmlinux.lds.S 2.8 KB

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