vmlinux.lds.S 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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. *(.irq.text)
  68. KPROBES_TEXT
  69. TEXT_TEXT
  70. SCHED_TEXT
  71. LOCK_TEXT
  72. *(.fixup)
  73. *(.gnu.warning)
  74. _etext = .;
  75. } = 0xd703d703
  76. . = ALIGN(4);
  77. __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
  78. __start___ex_table = .;
  79. *(__ex_table)
  80. __stop___ex_table = .;
  81. }
  82. RODATA
  83. . = ALIGN(THREAD_SIZE);
  84. .data : AT(ADDR(.data) - LOAD_OFFSET) {
  85. _data = .;
  86. _sdata = .;
  87. /*
  88. * First, the init task union, aligned to an 8K boundary.
  89. */
  90. *(.data.init_task)
  91. /* Then, the page-aligned data */
  92. . = ALIGN(PAGE_SIZE);
  93. *(.data.page_aligned)
  94. /* Then, the cacheline aligned data */
  95. . = ALIGN(L1_CACHE_BYTES);
  96. *(.data.cacheline_aligned)
  97. /* And the rest... */
  98. *(.data.rel*)
  99. DATA_DATA
  100. CONSTRUCTORS
  101. _edata = .;
  102. }
  103. . = ALIGN(8);
  104. .bss : AT(ADDR(.bss) - LOAD_OFFSET) {
  105. __bss_start = .;
  106. *(.bss)
  107. *(COMMON)
  108. . = ALIGN(8);
  109. __bss_stop = .;
  110. _end = .;
  111. }
  112. /* When something in the kernel is NOT compiled as a module, the module
  113. * cleanup code and data are put into these segments. Both can then be
  114. * thrown away, as cleanup code is never called unless it's a module.
  115. */
  116. /DISCARD/ : {
  117. EXIT_DATA
  118. *(.exitcall.exit)
  119. }
  120. DWARF_DEBUG
  121. }