vmlinux.lds.S 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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/autoconf.h>
  11. #include <asm-generic/vmlinux.lds.h>
  12. #include <asm/page.h>
  13. #ifdef CONFIG_ETRAX_VMEM_SIZE
  14. #define __CONFIG_ETRAX_VMEM_SIZE CONFIG_ETRAX_VMEM_SIZE
  15. #else
  16. #define __CONFIG_ETRAX_VMEM_SIZE 0
  17. #endif
  18. jiffies = jiffies_64;
  19. SECTIONS
  20. {
  21. . = DRAM_VIRTUAL_BASE;
  22. dram_start = .;
  23. #ifdef CONFIG_ETRAX_ARCH_V10
  24. ibr_start = .;
  25. #else
  26. ebp_start = .;
  27. /* The boot section is only necessary until the VCS top */
  28. /* level testbench includes both flash and DRAM. */
  29. .boot : { *(.boot) }
  30. #endif
  31. /* see head.S and pages reserved at the start */
  32. . = DRAM_VIRTUAL_BASE + 0x4000;
  33. _text = .; /* Text and read-only data. */
  34. text_start = .; /* Lots of aliases. */
  35. _stext = .;
  36. __stext = .;
  37. .text : {
  38. TEXT_TEXT
  39. SCHED_TEXT
  40. LOCK_TEXT
  41. *(.fixup)
  42. *(.text.__*)
  43. }
  44. _etext = . ; /* End of text section. */
  45. __etext = .;
  46. EXCEPTION_TABLE(4)
  47. RODATA
  48. . = ALIGN (4);
  49. ___data_start = . ;
  50. __Sdata = . ;
  51. .data : { /* Data */
  52. DATA_DATA
  53. }
  54. __edata = . ; /* End of data section. */
  55. _edata = . ;
  56. INIT_TASK_DATA_SECTION(PAGE_SIZE)
  57. . = ALIGN(PAGE_SIZE); /* Init code and data. */
  58. __init_begin = .;
  59. INIT_TEXT_SECTION(PAGE_SIZE)
  60. .init.data : { INIT_DATA }
  61. .init.setup : { INIT_SETUP(16) }
  62. #ifdef CONFIG_ETRAX_ARCH_V32
  63. __start___param = .;
  64. __param : { *(__param) }
  65. __stop___param = .;
  66. #endif
  67. .initcall.init : {
  68. INIT_CALLS
  69. }
  70. .con_initcall.init : {
  71. CON_INITCALL
  72. }
  73. SECURITY_INIT
  74. #ifdef CONFIG_ETRAX_ARCH_V10
  75. #ifdef CONFIG_BLK_DEV_INITRD
  76. .init.ramfs : {
  77. __initramfs_start = .;
  78. *(.init.ramfs)
  79. __initramfs_end = .;
  80. }
  81. #endif
  82. #endif
  83. __vmlinux_end = .; /* Last address of the physical file. */
  84. #ifdef CONFIG_ETRAX_ARCH_V32
  85. PERCPU(PAGE_SIZE)
  86. .init.ramfs : {
  87. INIT_RAM_FS
  88. }
  89. #endif
  90. /*
  91. * We fill to the next page, so we can discard all init
  92. * pages without needing to consider what payload might be
  93. * appended to the kernel image.
  94. */
  95. . = ALIGN(PAGE_SIZE);
  96. __init_end = .;
  97. __data_end = . ; /* Move to _edata ? */
  98. BSS_SECTION(0, 0, 0)
  99. . = ALIGN (0x20);
  100. _end = .;
  101. __end = .;
  102. dram_end = dram_start + (CONFIG_ETRAX_DRAM_SIZE - __CONFIG_ETRAX_VMEM_SIZE)*1024*1024;
  103. DISCARDS
  104. }