vmlinux.lds.c 2.5 KB

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