uml.lds.S 2.4 KB

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