vmlinux.lds.S 2.1 KB

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