uml.lds.S 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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. _stext = .;
  20. __init_begin = .;
  21. INIT_TEXT_SECTION(0)
  22. . = ALIGN(PAGE_SIZE);
  23. .text :
  24. {
  25. TEXT_TEXT
  26. SCHED_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.data : { INIT_DATA }
  57. .data :
  58. {
  59. INIT_TASK_DATA(KERNEL_STACK_SIZE)
  60. . = ALIGN(KERNEL_STACK_SIZE);
  61. *(.data..init_irqstack)
  62. DATA_DATA
  63. *(.gnu.linkonce.d*)
  64. CONSTRUCTORS
  65. }
  66. .data1 : { *(.data1) }
  67. .ctors :
  68. {
  69. *(.ctors)
  70. }
  71. .dtors :
  72. {
  73. *(.dtors)
  74. }
  75. .got : { *(.got.plt) *(.got) }
  76. .dynamic : { *(.dynamic) }
  77. .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
  78. .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
  79. /* We want the small data sections together, so single-instruction offsets
  80. can access them all, and initialized data all before uninitialized, so
  81. we can shorten the on-disk segment size. */
  82. .sdata : { *(.sdata) }
  83. _edata = .;
  84. PROVIDE (edata = .);
  85. . = ALIGN(PAGE_SIZE);
  86. __bss_start = .;
  87. PROVIDE(_bss_start = .);
  88. SBSS(0)
  89. BSS(0)
  90. _end = .;
  91. PROVIDE (end = .);
  92. STABS_DEBUG
  93. DWARF_DEBUG
  94. DISCARDS
  95. }