uml.lds.S 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #include <asm/vmlinux.lds.h>
  3. #include <asm/page.h>
  4. OUTPUT_FORMAT(ELF_FORMAT)
  5. OUTPUT_ARCH(ELF_ARCH)
  6. ENTRY(_start)
  7. jiffies = jiffies_64;
  8. VERSION {
  9. {
  10. local: *;
  11. };
  12. }
  13. SECTIONS
  14. {
  15. /* This must contain the right address - not quite the default ELF one.*/
  16. PROVIDE (__executable_start = START);
  17. /* Static binaries stick stuff here, like the sigreturn trampoline,
  18. * invisibly to objdump. So, just make __binary_start equal to the very
  19. * beginning of the executable, and if there are unmapped pages after this,
  20. * they are forever unusable.
  21. */
  22. __binary_start = START;
  23. . = START + SIZEOF_HEADERS;
  24. . = ALIGN(PAGE_SIZE);
  25. _text = .;
  26. INIT_TEXT_SECTION(0)
  27. .text :
  28. {
  29. _stext = .;
  30. TEXT_TEXT
  31. SCHED_TEXT
  32. CPUIDLE_TEXT
  33. LOCK_TEXT
  34. IRQENTRY_TEXT
  35. SOFTIRQENTRY_TEXT
  36. *(.fixup)
  37. /* .gnu.warning sections are handled specially by elf32.em. */
  38. *(.gnu.warning)
  39. *(.gnu.linkonce.t*)
  40. }
  41. . = ALIGN(PAGE_SIZE);
  42. .syscall_stub : {
  43. __syscall_stub_start = .;
  44. *(.__syscall_stub*)
  45. __syscall_stub_end = .;
  46. }
  47. /*
  48. * These are needed even in a static link, even if they wind up being empty.
  49. * Newer glibc needs these __rel{,a}_iplt_{start,end} symbols.
  50. */
  51. .rel.plt : {
  52. *(.rel.plt)
  53. PROVIDE_HIDDEN(__rel_iplt_start = .);
  54. *(.rel.iplt)
  55. PROVIDE_HIDDEN(__rel_iplt_end = .);
  56. }
  57. .rela.plt : {
  58. *(.rela.plt)
  59. PROVIDE_HIDDEN(__rela_iplt_start = .);
  60. *(.rela.iplt)
  61. PROVIDE_HIDDEN(__rela_iplt_end = .);
  62. }
  63. #include <asm/common.lds.S>
  64. __init_begin = .;
  65. init.data : { INIT_DATA }
  66. __init_end = .;
  67. .data :
  68. {
  69. INIT_TASK_DATA(KERNEL_STACK_SIZE)
  70. . = ALIGN(KERNEL_STACK_SIZE);
  71. *(.data..init_irqstack)
  72. DATA_DATA
  73. *(.gnu.linkonce.d*)
  74. CONSTRUCTORS
  75. }
  76. .data1 : { *(.data1) }
  77. .ctors :
  78. {
  79. *(.ctors)
  80. }
  81. .dtors :
  82. {
  83. *(.dtors)
  84. }
  85. .got : { *(.got.plt) *(.got) }
  86. .eh_frame : { KEEP (*(.eh_frame)) }
  87. .dynamic : { *(.dynamic) }
  88. .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
  89. .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
  90. /* We want the small data sections together, so single-instruction offsets
  91. can access them all, and initialized data all before uninitialized, so
  92. we can shorten the on-disk segment size. */
  93. .sdata : { *(.sdata) }
  94. _edata = .;
  95. PROVIDE (edata = .);
  96. . = ALIGN(PAGE_SIZE);
  97. __bss_start = .;
  98. PROVIDE(_bss_start = .);
  99. SBSS(0)
  100. BSS(0)
  101. __bss_stop = .;
  102. _end = .;
  103. PROVIDE (end = .);
  104. STABS_DEBUG
  105. DWARF_DEBUG
  106. ELF_DETAILS
  107. DISCARDS
  108. }