You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

efi.lds 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /* -*- sh -*- */
  2. /*
  3. * Linker script for EFI images
  4. *
  5. */
  6. SECTIONS {
  7. /* The file starts at a virtual address of zero, and sections are
  8. * contiguous. Each section is aligned to at least _max_align,
  9. * which defaults to 32. Load addresses are equal to virtual
  10. * addresses.
  11. */
  12. _max_align = 32;
  13. /* Allow plenty of space for file headers */
  14. . = 0x1000;
  15. /*
  16. * The text section
  17. *
  18. */
  19. . = ALIGN ( _max_align );
  20. .text : {
  21. _text = .;
  22. *(.text)
  23. *(.text.*)
  24. _etext = .;
  25. }
  26. /*
  27. * The rodata section
  28. *
  29. */
  30. . = ALIGN ( _max_align );
  31. .rodata : {
  32. _rodata = .;
  33. *(.rodata)
  34. *(.rodata.*)
  35. _erodata = .;
  36. }
  37. /*
  38. * The data section
  39. *
  40. */
  41. . = ALIGN ( _max_align );
  42. .data : {
  43. _data = .;
  44. *(.data)
  45. *(.data.*)
  46. KEEP(*(SORT(.tbl.*))) /* Various tables. See include/tables.h */
  47. KEEP(*(.provided))
  48. KEEP(*(.provided.*))
  49. _edata = .;
  50. }
  51. /*
  52. * The bss section
  53. *
  54. */
  55. . = ALIGN ( _max_align );
  56. .bss : {
  57. _bss = .;
  58. *(.bss)
  59. *(.bss.*)
  60. *(COMMON)
  61. _ebss = .;
  62. }
  63. /*
  64. * Weak symbols that need zero values if not otherwise defined
  65. *
  66. */
  67. .weak 0x0 : {
  68. _weak = .;
  69. *(.weak)
  70. *(.weak.*)
  71. _eweak = .;
  72. }
  73. _assert = ASSERT ( ( _weak == _eweak ), ".weak is non-zero length" );
  74. /*
  75. * Dispose of the comment and note sections to make the link map
  76. * easier to read
  77. *
  78. */
  79. /DISCARD/ : {
  80. *(.comment)
  81. *(.comment.*)
  82. *(.note)
  83. *(.note.*)
  84. *(.eh_frame)
  85. *(.eh_frame.*)
  86. *(.rel)
  87. *(.rel.*)
  88. *(.einfo)
  89. *(.einfo.*)
  90. *(.discard)
  91. *(.discard.*)
  92. }
  93. }