uml.lds.S 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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. /* We want the small data sections together, so single-instruction offsets
  68. can access them all, and initialized data all before uninitialized, so
  69. we can shorten the on-disk segment size. */
  70. .sdata : { *(.sdata) }
  71. _edata = .;
  72. PROVIDE (edata = .);
  73. . = ALIGN(0x1000);
  74. .sbss :
  75. {
  76. __bss_start = .;
  77. PROVIDE(_bss_start = .);
  78. *(.sbss)
  79. *(.scommon)
  80. }
  81. .bss :
  82. {
  83. *(.dynbss)
  84. *(.bss)
  85. *(COMMON)
  86. }
  87. _end = . ;
  88. PROVIDE (end = .);
  89. /* Stabs debugging sections. */
  90. .stab 0 : { *(.stab) }
  91. .stabstr 0 : { *(.stabstr) }
  92. .stab.excl 0 : { *(.stab.excl) }
  93. .stab.exclstr 0 : { *(.stab.exclstr) }
  94. .stab.index 0 : { *(.stab.index) }
  95. .stab.indexstr 0 : { *(.stab.indexstr) }
  96. .comment 0 : { *(.comment) }
  97. }