vmlinux-nommu.lds 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /*
  2. * vmlinux.lds.S -- master linker script for m68knommu arch
  3. *
  4. * (C) Copyright 2002-2012, Greg Ungerer <gerg@snapgear.com>
  5. *
  6. * This linker script is equipped to build either ROM loaded or RAM
  7. * run kernels.
  8. */
  9. #if defined(CONFIG_RAMKERNEL)
  10. #define KTEXT_ADDR CONFIG_KERNELBASE
  11. #endif
  12. #if defined(CONFIG_ROMKERNEL)
  13. #define KTEXT_ADDR CONFIG_ROMSTART
  14. #define KDATA_ADDR CONFIG_KERNELBASE
  15. #define LOAD_OFFSET KDATA_ADDR + (ADDR(.text) + SIZEOF(.text))
  16. #endif
  17. #include <asm/page.h>
  18. #include <asm/thread_info.h>
  19. #include <asm-generic/vmlinux.lds.h>
  20. OUTPUT_ARCH(m68k)
  21. ENTRY(_start)
  22. jiffies = jiffies_64 + 4;
  23. SECTIONS {
  24. #ifdef CONFIG_ROMVEC
  25. . = CONFIG_ROMVEC;
  26. .romvec : {
  27. __rom_start = .;
  28. _romvec = .;
  29. *(.romvec)
  30. *(.data..initvect)
  31. }
  32. #endif
  33. . = KTEXT_ADDR;
  34. _text = .;
  35. _stext = .;
  36. .text : {
  37. HEAD_TEXT
  38. TEXT_TEXT
  39. SCHED_TEXT
  40. CPUIDLE_TEXT
  41. LOCK_TEXT
  42. *(.fixup)
  43. . = ALIGN(16);
  44. }
  45. _etext = .;
  46. #ifdef KDATA_ADDR
  47. . = KDATA_ADDR;
  48. #endif
  49. _sdata = .;
  50. RO_DATA_SECTION(PAGE_SIZE)
  51. RW_DATA_SECTION(16, PAGE_SIZE, THREAD_SIZE)
  52. _edata = .;
  53. EXCEPTION_TABLE(16)
  54. NOTES
  55. . = ALIGN(PAGE_SIZE);
  56. __init_begin = .;
  57. INIT_TEXT_SECTION(PAGE_SIZE)
  58. INIT_DATA_SECTION(16)
  59. PERCPU_SECTION(16)
  60. .m68k_fixup : {
  61. __start_fixup = .;
  62. *(.m68k_fixup)
  63. __stop_fixup = .;
  64. }
  65. .init.data : {
  66. . = ALIGN(PAGE_SIZE);
  67. __init_end = .;
  68. }
  69. BSS_SECTION(0, 0, 0)
  70. _end = .;
  71. STABS_DEBUG
  72. .comment 0 : { *(.comment) }
  73. /* Sections to be discarded */
  74. DISCARDS
  75. }