vmlinux.lds.S 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /* ld script to make Meta Linux kernel */
  2. #include <asm/thread_info.h>
  3. #include <asm/page.h>
  4. #include <asm/cache.h>
  5. #include <asm-generic/vmlinux.lds.h>
  6. OUTPUT_FORMAT("elf32-metag", "elf32-metag", "elf32-metag")
  7. OUTPUT_ARCH(metag)
  8. ENTRY(__start)
  9. _jiffies = _jiffies_64;
  10. SECTIONS
  11. {
  12. . = CONFIG_PAGE_OFFSET;
  13. _text = .;
  14. __text = .;
  15. __stext = .;
  16. HEAD_TEXT_SECTION
  17. .text : {
  18. TEXT_TEXT
  19. SCHED_TEXT
  20. CPUIDLE_TEXT
  21. LOCK_TEXT
  22. KPROBES_TEXT
  23. IRQENTRY_TEXT
  24. SOFTIRQENTRY_TEXT
  25. *(.text.*)
  26. *(.gnu.warning)
  27. }
  28. __etext = .; /* End of text section */
  29. __sdata = .;
  30. RO_DATA_SECTION(PAGE_SIZE)
  31. RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
  32. __edata = .; /* End of data section */
  33. EXCEPTION_TABLE(16)
  34. NOTES
  35. . = ALIGN(PAGE_SIZE); /* Init code and data */
  36. ___init_begin = .;
  37. INIT_TEXT_SECTION(PAGE_SIZE)
  38. INIT_DATA_SECTION(16)
  39. .init.arch.info : {
  40. ___arch_info_begin = .;
  41. *(.arch.info.init)
  42. ___arch_info_end = .;
  43. }
  44. PERCPU_SECTION(L1_CACHE_BYTES)
  45. ___init_end = .;
  46. BSS_SECTION(0, PAGE_SIZE, 0)
  47. __end = .;
  48. . = ALIGN(PAGE_SIZE);
  49. __heap_start = .;
  50. DWARF_DEBUG
  51. /* When something in the kernel is NOT compiled as a module, the
  52. * module cleanup code and data are put into these segments. Both
  53. * can then be thrown away, as cleanup code is never called unless
  54. * it's a module.
  55. */
  56. DISCARDS
  57. }