vmlinux.lds.S 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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)
  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. .init.ramfs : {
  76. __initramfs_start = .;
  77. *(.init.ramfs)
  78. __initramfs_end = .;
  79. /* We fill to the next page, so we can discard all init
  80. pages without needing to consider what payload might be
  81. appended to the kernel image. */
  82. FILL (0);
  83. . = ALIGN (8192);
  84. }
  85. __vmlinux_end = .; /* last address of the physical file */
  86. __init_end = .;
  87. __data_end = . ; /* Move to _edata ? */
  88. __bss_start = .; /* BSS */
  89. .bss : {
  90. *(COMMON)
  91. *(.bss)
  92. }
  93. . = ALIGN (0x20);
  94. _end = .;
  95. __end = .;
  96. /* Sections to be discarded */
  97. /DISCARD/ : {
  98. *(.text.exit)
  99. *(.data.exit)
  100. *(.exitcall.exit)
  101. }
  102. dram_end = dram_start + CONFIG_ETRAX_DRAM_SIZE*1024*1024;
  103. }