vmlinux.lds.S 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. CPUIDLE_TEXT
  33. LOCK_TEXT
  34. KPROBES_TEXT
  35. *(.fixup)
  36. *(.gnu.warning)
  37. } = 0xcb
  38. _etext = .; /* End of text section */
  39. EXCEPTION_TABLE(16)
  40. BUG_TABLE
  41. RO_DATA(PAGE_SIZE)
  42. /* writeable */
  43. _sdata = .; /* Start of rw data section */
  44. RW_DATA_SECTION(32, PAGE_SIZE, THREAD_SIZE)
  45. _edata = .;
  46. /* might get freed after init */
  47. . = ALIGN(PAGE_SIZE);
  48. .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) {
  49. __smp_locks = .;
  50. *(.smp_locks)
  51. __smp_locks_end = .;
  52. }
  53. /* will be freed after init */
  54. . = ALIGN(PAGE_SIZE); /* Init code and data */
  55. __init_begin = .;
  56. INIT_TEXT_SECTION(PAGE_SIZE)
  57. INIT_DATA_SECTION(16)
  58. . = ALIGN(4);
  59. __alt_instructions = .;
  60. .altinstructions : { *(.altinstructions) }
  61. __alt_instructions_end = .;
  62. .altinstr_replacement : { *(.altinstr_replacement) }
  63. /* .exit.text is discard at runtime, not link time, to deal with references
  64. from .altinstructions and .eh_frame */
  65. .exit.text : { EXIT_TEXT; }
  66. .exit.data : { EXIT_DATA; }
  67. PERCPU_SECTION(32)
  68. . = ALIGN(PAGE_SIZE);
  69. __init_end = .;
  70. /* freed after init ends here */
  71. BSS_SECTION(0, PAGE_SIZE, 4)
  72. _end = . ;
  73. /* This is where the kernel creates the early boot page tables */
  74. . = ALIGN(PAGE_SIZE);
  75. pg0 = .;
  76. STABS_DEBUG
  77. DWARF_DEBUG
  78. /* Sections to be discarded */
  79. DISCARDS
  80. }