uml.lds.S 2.4 KB

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