vmlinux.lds.c 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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. _einittext = .;
  27. . = ALIGN(4);
  28. __tagtable_begin = .;
  29. *(.taglist)
  30. __tagtable_end = .;
  31. *(.init.data)
  32. . = ALIGN(16);
  33. __setup_start = .;
  34. *(.init.setup)
  35. __setup_end = .;
  36. . = ALIGN(4);
  37. __initcall_start = .;
  38. *(.initcall1.init)
  39. *(.initcall2.init)
  40. *(.initcall3.init)
  41. *(.initcall4.init)
  42. *(.initcall5.init)
  43. *(.initcall6.init)
  44. *(.initcall7.init)
  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. . = ALIGN(32);
  53. __initramfs_start = .;
  54. *(.init.ramfs)
  55. __initramfs_end = .;
  56. . = ALIGN(4096);
  57. __init_end = .;
  58. }
  59. . = ALIGN(8192);
  60. .text : AT(ADDR(.text) - LOAD_OFFSET) {
  61. _evba = .;
  62. _text = .;
  63. *(.ex.text)
  64. . = 0x50;
  65. *(.tlbx.ex.text)
  66. . = 0x60;
  67. *(.tlbr.ex.text)
  68. . = 0x70;
  69. *(.tlbw.ex.text)
  70. . = 0x100;
  71. *(.scall.text)
  72. *(.irq.text)
  73. *(.text)
  74. SCHED_TEXT
  75. LOCK_TEXT
  76. KPROBES_TEXT
  77. *(.fixup)
  78. *(.gnu.warning)
  79. _etext = .;
  80. } = 0xd703d703
  81. . = ALIGN(4);
  82. __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
  83. __start___ex_table = .;
  84. *(__ex_table)
  85. __stop___ex_table = .;
  86. }
  87. RODATA
  88. . = ALIGN(8192);
  89. .data : AT(ADDR(.data) - LOAD_OFFSET) {
  90. _data = .;
  91. _sdata = .;
  92. /*
  93. * First, the init task union, aligned to an 8K boundary.
  94. */
  95. *(.data.init_task)
  96. /* Then, the cacheline aligned data */
  97. . = ALIGN(32);
  98. *(.data.cacheline_aligned)
  99. /* And the rest... */
  100. *(.data.rel*)
  101. *(.data)
  102. CONSTRUCTORS
  103. _edata = .;
  104. }
  105. . = ALIGN(8);
  106. .bss : AT(ADDR(.bss) - LOAD_OFFSET) {
  107. __bss_start = .;
  108. *(.bss)
  109. *(COMMON)
  110. . = ALIGN(8);
  111. __bss_stop = .;
  112. _end = .;
  113. }
  114. /* When something in the kernel is NOT compiled as a module, the module
  115. * cleanup code and data are put into these segments. Both can then be
  116. * thrown away, as cleanup code is never called unless it's a module.
  117. */
  118. /DISCARD/ : {
  119. *(.exit.text)
  120. *(.exit.data)
  121. *(.exitcall.exit)
  122. }
  123. DWARF_DEBUG
  124. }