uml.lds.S 2.4 KB

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