vmlinux.lds.S 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. /* MN10300 Main kernel linker script
  2. *
  3. * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
  4. * Written by David Howells (dhowells@redhat.com)
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public Licence
  8. * as published by the Free Software Foundation; either version
  9. * 2 of the Licence, or (at your option) any later version.
  10. */
  11. #define __VMLINUX_LDS__
  12. #include <asm-generic/vmlinux.lds.h>
  13. #include <asm/thread_info.h>
  14. #include <asm/page.h>
  15. OUTPUT_FORMAT("elf32-am33lin", "elf32-am33lin", "elf32-am33lin")
  16. OUTPUT_ARCH(mn10300)
  17. ENTRY(_start)
  18. jiffies = jiffies_64;
  19. #ifndef CONFIG_MN10300_CURRENT_IN_E2
  20. current = __current;
  21. #endif
  22. SECTIONS
  23. {
  24. . = CONFIG_KERNEL_TEXT_ADDRESS;
  25. /* read-only */
  26. _stext = .;
  27. _text = .; /* Text and read-only data */
  28. .text : {
  29. HEAD_TEXT
  30. TEXT_TEXT
  31. SCHED_TEXT
  32. LOCK_TEXT
  33. KPROBES_TEXT
  34. *(.fixup)
  35. *(.gnu.warning)
  36. } = 0xcb
  37. _etext = .; /* End of text section */
  38. EXCEPTION_TABLE(16)
  39. BUG_TABLE
  40. RO_DATA(PAGE_SIZE)
  41. /* writeable */
  42. .data : { /* Data */
  43. DATA_DATA
  44. CONSTRUCTORS
  45. }
  46. .data_nosave : { NOSAVE_DATA; }
  47. .data.page_aligned : { PAGE_ALIGNED_DATA(PAGE_SIZE); }
  48. .data.cacheline_aligned : { CACHELINE_ALIGNED_DATA(32); }
  49. /* rarely changed data like cpu maps */
  50. . = ALIGN(32);
  51. .data.read_mostly : AT(ADDR(.data.read_mostly)) {
  52. READ_MOSTLY_DATA(32);
  53. _edata = .; /* End of data section */
  54. }
  55. .data.init_task : { INIT_TASK_DATA(THREAD_SIZE); }
  56. /* might get freed after init */
  57. . = ALIGN(PAGE_SIZE);
  58. .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) {
  59. __smp_locks = .;
  60. *(.smp_locks)
  61. __smp_locks_end = .;
  62. }
  63. /* will be freed after init */
  64. . = ALIGN(PAGE_SIZE); /* Init code and data */
  65. __init_begin = .;
  66. .init.text : {
  67. _sinittext = .;
  68. INIT_TEXT;
  69. _einittext = .;
  70. }
  71. .init.data : { INIT_DATA; }
  72. .setup.init : { INIT_SETUP(16); }
  73. __initcall_start = .;
  74. .initcall.init : {
  75. INITCALLS
  76. }
  77. __initcall_end = .;
  78. .con_initcall.init : { CON_INITCALL; }
  79. SECURITY_INIT
  80. . = ALIGN(4);
  81. __alt_instructions = .;
  82. .altinstructions : { *(.altinstructions) }
  83. __alt_instructions_end = .;
  84. .altinstr_replacement : { *(.altinstr_replacement) }
  85. /* .exit.text is discard at runtime, not link time, to deal with references
  86. from .altinstructions and .eh_frame */
  87. .exit.text : { EXIT_TEXT; }
  88. .exit.data : { EXIT_DATA; }
  89. .init.ramfs : { INIT_RAM_FS; }
  90. PERCPU(32)
  91. . = ALIGN(PAGE_SIZE);
  92. __init_end = .;
  93. /* freed after init ends here */
  94. BSS(4)
  95. _end = . ;
  96. /* This is where the kernel creates the early boot page tables */
  97. . = ALIGN(PAGE_SIZE);
  98. pg0 = .;
  99. /* Sections to be discarded */
  100. /DISCARD/ : {
  101. EXIT_CALL
  102. }
  103. STABS_DEBUG
  104. DWARF_DEBUG
  105. }