vmlinux.lds.S 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. LOCK_TEXT
  21. KPROBES_TEXT
  22. IRQENTRY_TEXT
  23. *(.text.*)
  24. *(.gnu.warning)
  25. }
  26. __etext = .; /* End of text section */
  27. __sdata = .;
  28. RO_DATA_SECTION(PAGE_SIZE)
  29. RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
  30. __edata = .; /* End of data section */
  31. EXCEPTION_TABLE(16)
  32. NOTES
  33. . = ALIGN(PAGE_SIZE); /* Init code and data */
  34. ___init_begin = .;
  35. INIT_TEXT_SECTION(PAGE_SIZE)
  36. INIT_DATA_SECTION(16)
  37. .init.arch.info : {
  38. ___arch_info_begin = .;
  39. *(.arch.info.init)
  40. ___arch_info_end = .;
  41. }
  42. PERCPU_SECTION(L1_CACHE_BYTES)
  43. ___init_end = .;
  44. BSS_SECTION(0, PAGE_SIZE, 0)
  45. __end = .;
  46. . = ALIGN(PAGE_SIZE);
  47. __heap_start = .;
  48. DWARF_DEBUG
  49. /* When something in the kernel is NOT compiled as a module, the
  50. * module cleanup code and data are put into these segments. Both
  51. * can then be thrown away, as cleanup code is never called unless
  52. * it's a module.
  53. */
  54. DISCARDS
  55. }