uml.lds.S 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #include <asm-generic/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. _text = .;
  25. INIT_TEXT_SECTION(0)
  26. . = ALIGN(PAGE_SIZE);
  27. .text :
  28. {
  29. _stext = .;
  30. TEXT_TEXT
  31. SCHED_TEXT
  32. CPUIDLE_TEXT
  33. LOCK_TEXT
  34. *(.fixup)
  35. /* .gnu.warning sections are handled specially by elf32.em. */
  36. *(.gnu.warning)
  37. *(.gnu.linkonce.t*)
  38. }
  39. . = ALIGN(PAGE_SIZE);
  40. .syscall_stub : {
  41. __syscall_stub_start = .;
  42. *(.__syscall_stub*)
  43. __syscall_stub_end = .;
  44. }
  45. /*
  46. * These are needed even in a static link, even if they wind up being empty.
  47. * Newer glibc needs these __rel{,a}_iplt_{start,end} symbols.
  48. */
  49. .rel.plt : {
  50. *(.rel.plt)
  51. PROVIDE_HIDDEN(__rel_iplt_start = .);
  52. *(.rel.iplt)
  53. PROVIDE_HIDDEN(__rel_iplt_end = .);
  54. }
  55. .rela.plt : {
  56. *(.rela.plt)
  57. PROVIDE_HIDDEN(__rela_iplt_start = .);
  58. *(.rela.iplt)
  59. PROVIDE_HIDDEN(__rela_iplt_end = .);
  60. }
  61. #include <asm/common.lds.S>
  62. __init_begin = .;
  63. init.data : { INIT_DATA }
  64. __init_end = .;
  65. .data :
  66. {
  67. INIT_TASK_DATA(KERNEL_STACK_SIZE)
  68. . = ALIGN(KERNEL_STACK_SIZE);
  69. *(.data..init_irqstack)
  70. DATA_DATA
  71. *(.gnu.linkonce.d*)
  72. CONSTRUCTORS
  73. }
  74. .data1 : { *(.data1) }
  75. .ctors :
  76. {
  77. *(.ctors)
  78. }
  79. .dtors :
  80. {
  81. *(.dtors)
  82. }
  83. .got : { *(.got.plt) *(.got) }
  84. .dynamic : { *(.dynamic) }
  85. .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
  86. .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
  87. /* We want the small data sections together, so single-instruction offsets
  88. can access them all, and initialized data all before uninitialized, so
  89. we can shorten the on-disk segment size. */
  90. .sdata : { *(.sdata) }
  91. _edata = .;
  92. PROVIDE (edata = .);
  93. . = ALIGN(PAGE_SIZE);
  94. __bss_start = .;
  95. PROVIDE(_bss_start = .);
  96. SBSS(0)
  97. BSS(0)
  98. __bss_stop = .;
  99. _end = .;
  100. PROVIDE (end = .);
  101. STABS_DEBUG
  102. DWARF_DEBUG
  103. DISCARDS
  104. }