vmlinux.lds.c 2.7 KB

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