vmlinux.lds.S 2.1 KB

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