vmlinux.lds.c 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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. INITCALLS
  39. __initcall_end = .;
  40. __con_initcall_start = .;
  41. *(.con_initcall.init)
  42. __con_initcall_end = .;
  43. __security_initcall_start = .;
  44. *(.security_initcall.init)
  45. __security_initcall_end = .;
  46. #ifdef CONFIG_BLK_DEV_INITRD
  47. . = ALIGN(32);
  48. __initramfs_start = .;
  49. *(.init.ramfs)
  50. __initramfs_end = .;
  51. #endif
  52. . = ALIGN(4096);
  53. __init_end = .;
  54. }
  55. . = ALIGN(8192);
  56. .text : AT(ADDR(.text) - LOAD_OFFSET) {
  57. _evba = .;
  58. _text = .;
  59. *(.ex.text)
  60. . = 0x50;
  61. *(.tlbx.ex.text)
  62. . = 0x60;
  63. *(.tlbr.ex.text)
  64. . = 0x70;
  65. *(.tlbw.ex.text)
  66. . = 0x100;
  67. *(.scall.text)
  68. *(.irq.text)
  69. *(.text)
  70. SCHED_TEXT
  71. LOCK_TEXT
  72. KPROBES_TEXT
  73. *(.fixup)
  74. *(.gnu.warning)
  75. _etext = .;
  76. } = 0xd703d703
  77. . = ALIGN(4);
  78. __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
  79. __start___ex_table = .;
  80. *(__ex_table)
  81. __stop___ex_table = .;
  82. }
  83. RODATA
  84. . = ALIGN(8192);
  85. .data : AT(ADDR(.data) - LOAD_OFFSET) {
  86. _data = .;
  87. _sdata = .;
  88. /*
  89. * First, the init task union, aligned to an 8K boundary.
  90. */
  91. *(.data.init_task)
  92. /* Then, the cacheline aligned data */
  93. . = ALIGN(32);
  94. *(.data.cacheline_aligned)
  95. /* And the rest... */
  96. *(.data.rel*)
  97. *(.data)
  98. CONSTRUCTORS
  99. _edata = .;
  100. }
  101. . = ALIGN(8);
  102. .bss : AT(ADDR(.bss) - LOAD_OFFSET) {
  103. __bss_start = .;
  104. *(.bss)
  105. *(COMMON)
  106. . = ALIGN(8);
  107. __bss_stop = .;
  108. _end = .;
  109. }
  110. /* When something in the kernel is NOT compiled as a module, the module
  111. * cleanup code and data are put into these segments. Both can then be
  112. * thrown away, as cleanup code is never called unless it's a module.
  113. */
  114. /DISCARD/ : {
  115. *(.exit.text)
  116. *(.exit.data)
  117. *(.exitcall.exit)
  118. }
  119. DWARF_DEBUG
  120. }