elf_mips64el_efi.lds 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. OUTPUT_FORMAT("elf64-tradlittlemips", "elf64-tradbigmips", "elf64-tradlittlemips")
  2. OUTPUT_ARCH(mips)
  3. ENTRY(_start)
  4. SECTIONS
  5. {
  6. .text 0x0 : {
  7. _text = .;
  8. *(.text.head)
  9. *(.text)
  10. *(.text.*)
  11. *(.gnu.linkonce.t.*)
  12. *(.plt)
  13. . = ALIGN(16);
  14. }
  15. _etext = .;
  16. _text_size = _etext - _text;
  17. . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
  18. .dynamic : { *(.dynamic) }
  19. . = ALIGN(4096);
  20. .data :
  21. {
  22. _data = .;
  23. *(.sdata)
  24. *(.data)
  25. *(.data1)
  26. *(.data.*)
  27. *(.got.plt)
  28. HIDDEN (_gp = ALIGN (16) + 0x7ff0);
  29. *(.got)
  30. /*
  31. * Note that these aren't the using the GNU "CONSTRUCTOR" output section
  32. * command, so they don't start with a size. Because of p2align and the
  33. * end/END definitions, and the fact that they're mergeable, they can also
  34. * have NULLs which aren't guaranteed to be at the end.
  35. */
  36. . = ALIGN(16);
  37. __init_array_start = .;
  38. *(SORT(.init_array.*))
  39. *(.init_array)
  40. __init_array_end = .;
  41. . = ALIGN(16);
  42. __CTOR_LIST__ = .;
  43. *(SORT(.ctors.*))
  44. *(.ctors)
  45. __CTOR_END__ = .;
  46. . = ALIGN(16);
  47. __DTOR_LIST__ = .;
  48. *(SORT(.dtors.*))
  49. *(.dtors)
  50. __DTOR_END__ = .;
  51. . = ALIGN(16);
  52. __fini_array_start = .;
  53. *(SORT(.fini_array.*))
  54. *(.fini_array)
  55. __fini_array_end = .;
  56. /* the EFI loader doesn't seem to like a .bss section, so we stick
  57. it all into .data: */
  58. . = ALIGN(16);
  59. _bss = .;
  60. *(.sbss)
  61. *(.scommon)
  62. *(.dynbss)
  63. *(.bss*)
  64. *(COMMON)
  65. . = ALIGN(16);
  66. _bss_end = .;
  67. }
  68. . = ALIGN(4096);
  69. .rel :
  70. {
  71. *(.rel.text*)
  72. *(.rel.data*)
  73. *(.rel.got)
  74. *(.rel.dyn)
  75. *(.rel.stab)
  76. *(.rel.init_array*)
  77. *(.rel.fini_array*)
  78. *(.rel.ctors*)
  79. *(.rel.dtors*)
  80. }
  81. . = ALIGN(4096);
  82. .rel.plt : { *(.rel.plt) }
  83. . = ALIGN(4096);
  84. .rodata : { *(.rodata*) }
  85. _edata = .;
  86. _data_size = _edata - _etext;
  87. . = ALIGN(4096);
  88. .dynsym : { *(.dynsym) }
  89. . = ALIGN(4096);
  90. .dynstr : { *(.dynstr) }
  91. . = ALIGN(4096);
  92. .note.gnu.build-id : { *(.note.gnu.build-id) }
  93. . = DATA_SEGMENT_END (.);
  94. /DISCARD/ :
  95. {
  96. *(.rel.reloc)
  97. *(.eh_frame)
  98. *(.MIPS.abiflags)
  99. *(.note.GNU-stack)
  100. }
  101. .comment 0 : { *(.comment) }
  102. }