vmlinux.lds.S 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. // SPDX-License-Identifier: GPL-2.0
  2. // Copyright (C) 2005-2017 Andes Technology Corporation
  3. #include <asm/page.h>
  4. #include <asm/thread_info.h>
  5. #include <asm/cache.h>
  6. #include <asm/memory.h>
  7. #define LOAD_OFFSET (PAGE_OFFSET - PHYS_OFFSET)
  8. #include <asm-generic/vmlinux.lds.h>
  9. OUTPUT_ARCH(nds32)
  10. ENTRY(_stext_lma)
  11. jiffies = jiffies_64;
  12. #if defined(CONFIG_GCOV_KERNEL)
  13. #define NDS32_EXIT_KEEP(x) x
  14. #else
  15. #define NDS32_EXIT_KEEP(x)
  16. #endif
  17. SECTIONS
  18. {
  19. _stext_lma = TEXTADDR - LOAD_OFFSET;
  20. . = TEXTADDR;
  21. __init_begin = .;
  22. HEAD_TEXT_SECTION
  23. .exit.text : {
  24. NDS32_EXIT_KEEP(EXIT_TEXT)
  25. }
  26. INIT_TEXT_SECTION(PAGE_SIZE)
  27. INIT_DATA_SECTION(16)
  28. .exit.data : {
  29. NDS32_EXIT_KEEP(EXIT_DATA)
  30. }
  31. PERCPU_SECTION(L1_CACHE_BYTES)
  32. __init_end = .;
  33. . = ALIGN(PAGE_SIZE);
  34. _stext = .;
  35. /* Real text segment */
  36. .text : AT(ADDR(.text) - LOAD_OFFSET) {
  37. _text = .; /* Text and read-only data */
  38. TEXT_TEXT
  39. SCHED_TEXT
  40. CPUIDLE_TEXT
  41. LOCK_TEXT
  42. KPROBES_TEXT
  43. IRQENTRY_TEXT
  44. *(.fixup)
  45. }
  46. _etext = .; /* End of text and rodata section */
  47. _sdata = .;
  48. RO_DATA_SECTION(PAGE_SIZE)
  49. RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
  50. _edata = .;
  51. EXCEPTION_TABLE(16)
  52. NOTES
  53. BSS_SECTION(4, 4, 4)
  54. _end = .;
  55. STABS_DEBUG
  56. DWARF_DEBUG
  57. DISCARDS
  58. }