vmlinux.lds.S 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. /*
  2. * AVR32 linker script for the Linux kernel
  3. *
  4. * Copyright (C) 2004-2006 Atmel Corporation
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. #define LOAD_OFFSET 0x00000000
  11. #include <asm-generic/vmlinux.lds.h>
  12. #include <asm/cache.h>
  13. #include <asm/thread_info.h>
  14. OUTPUT_FORMAT("elf32-avr32", "elf32-avr32", "elf32-avr32")
  15. OUTPUT_ARCH(avr32)
  16. ENTRY(_start)
  17. /* Big endian */
  18. jiffies = jiffies_64 + 4;
  19. SECTIONS
  20. {
  21. . = CONFIG_ENTRY_ADDRESS;
  22. .init : AT(ADDR(.init) - LOAD_OFFSET) {
  23. _stext = .;
  24. __init_begin = .;
  25. _sinittext = .;
  26. *(.text.reset)
  27. *(.init.text)
  28. /*
  29. * .exit.text is discarded at runtime, not
  30. * link time, to deal with references from
  31. * __bug_table
  32. */
  33. *(.exit.text)
  34. _einittext = .;
  35. . = ALIGN(4);
  36. __tagtable_begin = .;
  37. *(.taglist.init)
  38. __tagtable_end = .;
  39. *(.init.data)
  40. . = ALIGN(16);
  41. __setup_start = .;
  42. *(.init.setup)
  43. __setup_end = .;
  44. . = ALIGN(4);
  45. __initcall_start = .;
  46. INITCALLS
  47. __initcall_end = .;
  48. __con_initcall_start = .;
  49. *(.con_initcall.init)
  50. __con_initcall_end = .;
  51. __security_initcall_start = .;
  52. *(.security_initcall.init)
  53. __security_initcall_end = .;
  54. #ifdef CONFIG_BLK_DEV_INITRD
  55. . = ALIGN(32);
  56. __initramfs_start = .;
  57. *(.init.ramfs)
  58. __initramfs_end = .;
  59. #endif
  60. . = ALIGN(PAGE_SIZE);
  61. __init_end = .;
  62. }
  63. .text : AT(ADDR(.text) - LOAD_OFFSET) {
  64. _evba = .;
  65. _text = .;
  66. *(.ex.text)
  67. . = 0x50;
  68. *(.tlbx.ex.text)
  69. . = 0x60;
  70. *(.tlbr.ex.text)
  71. . = 0x70;
  72. *(.tlbw.ex.text)
  73. . = 0x100;
  74. *(.scall.text)
  75. *(.irq.text)
  76. TEXT_TEXT
  77. SCHED_TEXT
  78. LOCK_TEXT
  79. KPROBES_TEXT
  80. *(.fixup)
  81. *(.gnu.warning)
  82. _etext = .;
  83. } = 0xd703d703
  84. . = ALIGN(4);
  85. __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
  86. __start___ex_table = .;
  87. *(__ex_table)
  88. __stop___ex_table = .;
  89. }
  90. BUG_TABLE
  91. RODATA
  92. . = ALIGN(THREAD_SIZE);
  93. .data : AT(ADDR(.data) - LOAD_OFFSET) {
  94. _data = .;
  95. _sdata = .;
  96. /*
  97. * First, the init task union, aligned to an 8K boundary.
  98. */
  99. *(.data.init_task)
  100. /* Then, the cacheline aligned data */
  101. . = ALIGN(L1_CACHE_BYTES);
  102. *(.data.cacheline_aligned)
  103. /* And the rest... */
  104. *(.data.rel*)
  105. DATA_DATA
  106. CONSTRUCTORS
  107. _edata = .;
  108. }
  109. . = ALIGN(8);
  110. .bss : AT(ADDR(.bss) - LOAD_OFFSET) {
  111. __bss_start = .;
  112. *(.bss)
  113. *(COMMON)
  114. . = ALIGN(8);
  115. __bss_stop = .;
  116. _end = .;
  117. }
  118. /* When something in the kernel is NOT compiled as a module, the module
  119. * cleanup code and data are put into these segments. Both can then be
  120. * thrown away, as cleanup code is never called unless it's a module.
  121. */
  122. /DISCARD/ : {
  123. *(.exit.data)
  124. *(.exitcall.exit)
  125. }
  126. DWARF_DEBUG
  127. }