vmlinux.lds.S 2.7 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. #include <asm/page.h>
  12. #ifdef CONFIG_ETRAX_VMEM_SIZE
  13. #define __CONFIG_ETRAX_VMEM_SIZE CONFIG_ETRAX_VMEM_SIZE
  14. #else
  15. #define __CONFIG_ETRAX_VMEM_SIZE 0
  16. #endif
  17. jiffies = jiffies_64;
  18. SECTIONS
  19. {
  20. . = DRAM_VIRTUAL_BASE;
  21. dram_start = .;
  22. ebp_start = .;
  23. /* The boot section is only necessary until the VCS top */
  24. /* level testbench includes both flash and DRAM. */
  25. .boot : { *(.boot) }
  26. /* See head.S and pages reserved at the start. */
  27. . = DRAM_VIRTUAL_BASE + 0x4000;
  28. _text = .; /* Text and read-only data. */
  29. text_start = .; /* Lots of aliases. */
  30. _stext = .;
  31. __stext = .;
  32. .text : {
  33. TEXT_TEXT
  34. SCHED_TEXT
  35. LOCK_TEXT
  36. *(.fixup)
  37. *(.text.__*)
  38. }
  39. _etext = . ; /* End of text section. */
  40. __etext = .;
  41. . = ALIGN(4); /* Exception table. */
  42. __start___ex_table = .;
  43. __ex_table : { *(__ex_table) }
  44. __stop___ex_table = .;
  45. RODATA
  46. . = ALIGN (4);
  47. ___data_start = . ;
  48. __Sdata = . ;
  49. .data : { /* Data */
  50. DATA_DATA
  51. }
  52. __edata = . ; /* End of data section. */
  53. _edata = . ;
  54. . = ALIGN(PAGE_SIZE); /* init_task and stack, must be aligned. */
  55. .data.init_task : { *(.data.init_task) }
  56. . = ALIGN(PAGE_SIZE); /* Init code and data. */
  57. __init_begin = .;
  58. .init.text : {
  59. _sinittext = .;
  60. INIT_TEXT
  61. _einittext = .;
  62. }
  63. .init.data : { INIT_DATA }
  64. . = ALIGN(16);
  65. __setup_start = .;
  66. .init.setup : { *(.init.setup) }
  67. __setup_end = .;
  68. __start___param = .;
  69. __param : { *(__param) }
  70. __stop___param = .;
  71. .initcall.init : {
  72. __initcall_start = .;
  73. INITCALLS
  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. __vmlinux_end = .; /* Last address of the physical file. */
  83. PERCPU(PAGE_SIZE)
  84. .init.ramfs : {
  85. __initramfs_start = .;
  86. *(.init.ramfs)
  87. __initramfs_end = .;
  88. }
  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. . = ALIGN (PAGE_SIZE);
  95. __init_end = .;
  96. __data_end = . ; /* Move to _edata? */
  97. __bss_start = .; /* BSS. */
  98. .bss : {
  99. *(COMMON)
  100. *(.bss)
  101. }
  102. . = ALIGN (0x20);
  103. _end = .;
  104. __end = .;
  105. /* Sections to be discarded */
  106. /DISCARD/ : {
  107. EXIT_TEXT
  108. EXIT_DATA
  109. *(.exitcall.exit)
  110. }
  111. dram_end = dram_start + (CONFIG_ETRAX_DRAM_SIZE - __CONFIG_ETRAX_VMEM_SIZE)*1024*1024;
  112. }