uml.lds.S 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. #include <asm-generic/vmlinux.lds.h>
  2. OUTPUT_FORMAT(ELF_FORMAT)
  3. OUTPUT_ARCH(ELF_ARCH)
  4. ENTRY(_start)
  5. jiffies = jiffies_64;
  6. SECTIONS
  7. {
  8. /*This must contain the right address - not quite the default ELF one.*/
  9. PROVIDE (__executable_start = START);
  10. . = START + SIZEOF_HEADERS;
  11. /* Used in arch/um/kernel/mem.c. Any memory between START and __binary_start
  12. * is remapped.*/
  13. __binary_start = .;
  14. #ifdef MODE_TT
  15. .thread_private : {
  16. __start_thread_private = .;
  17. errno = .;
  18. . += 4;
  19. arch/um/kernel/tt/unmap_fin.o (.data)
  20. __end_thread_private = .;
  21. }
  22. . = ALIGN(4096);
  23. .remap : { arch/um/kernel/tt/unmap_fin.o (.text) }
  24. /* We want it only if we are in MODE_TT. In both cases, however, when MODE_TT
  25. * is off the resulting binary segfaults.*/
  26. . = ALIGN(4096); /* Init code and data */
  27. #endif
  28. _stext = .;
  29. __init_begin = .;
  30. .init.text : {
  31. _sinittext = .;
  32. *(.init.text)
  33. _einittext = .;
  34. }
  35. . = ALIGN(4096);
  36. .text :
  37. {
  38. *(.text)
  39. SCHED_TEXT
  40. LOCK_TEXT
  41. *(.fixup)
  42. /* .gnu.warning sections are handled specially by elf32.em. */
  43. *(.gnu.warning)
  44. *(.gnu.linkonce.t*)
  45. }
  46. #include "asm/common.lds.S"
  47. init.data : { *(init.data) }
  48. .data :
  49. {
  50. . = ALIGN(KERNEL_STACK_SIZE); /* init_task */
  51. *(.data.init_task)
  52. *(.data)
  53. *(.gnu.linkonce.d*)
  54. CONSTRUCTORS
  55. }
  56. .data1 : { *(.data1) }
  57. .ctors :
  58. {
  59. *(.ctors)
  60. }
  61. .dtors :
  62. {
  63. *(.dtors)
  64. }
  65. .got : { *(.got.plt) *(.got) }
  66. .dynamic : { *(.dynamic) }
  67. .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
  68. .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
  69. /* We want the small data sections together, so single-instruction offsets
  70. can access them all, and initialized data all before uninitialized, so
  71. we can shorten the on-disk segment size. */
  72. .sdata : { *(.sdata) }
  73. _edata = .;
  74. PROVIDE (edata = .);
  75. . = ALIGN(0x1000);
  76. .sbss :
  77. {
  78. __bss_start = .;
  79. PROVIDE(_bss_start = .);
  80. *(.sbss)
  81. *(.scommon)
  82. }
  83. .bss :
  84. {
  85. *(.dynbss)
  86. *(.bss)
  87. *(COMMON)
  88. }
  89. _end = . ;
  90. PROVIDE (end = .);
  91. /* Stabs debugging sections. */
  92. .stab 0 : { *(.stab) }
  93. .stabstr 0 : { *(.stabstr) }
  94. .stab.excl 0 : { *(.stab.excl) }
  95. .stab.exclstr 0 : { *(.stab.exclstr) }
  96. .stab.index 0 : { *(.stab.index) }
  97. .stab.indexstr 0 : { *(.stab.indexstr) }
  98. .comment 0 : { *(.comment) }
  99. }