uml.lds.S 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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(PAGE_SIZE)
  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. #include "asm/common.lds.S"
  40. init.data : { INIT_DATA }
  41. .data :
  42. {
  43. INIT_TASK_DATA(KERNEL_STACK_SIZE)
  44. . = ALIGN(KERNEL_STACK_SIZE);
  45. *(.data.init_irqstack)
  46. DATA_DATA
  47. *(.gnu.linkonce.d*)
  48. CONSTRUCTORS
  49. }
  50. .data1 : { *(.data1) }
  51. .ctors :
  52. {
  53. *(.ctors)
  54. }
  55. .dtors :
  56. {
  57. *(.dtors)
  58. }
  59. .got : { *(.got.plt) *(.got) }
  60. .dynamic : { *(.dynamic) }
  61. .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
  62. .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
  63. /* We want the small data sections together, so single-instruction offsets
  64. can access them all, and initialized data all before uninitialized, so
  65. we can shorten the on-disk segment size. */
  66. .sdata : { *(.sdata) }
  67. _edata = .;
  68. PROVIDE (edata = .);
  69. . = ALIGN(PAGE_SIZE);
  70. __bss_start = .;
  71. PROVIDE(_bss_start = .);
  72. SBSS(0)
  73. BSS(0)
  74. _end = .;
  75. PROVIDE (end = .);
  76. STABS_DEBUG
  77. DWARF_DEBUG
  78. DISCARDS
  79. }