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.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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. *(SORT(.tbl.*)) /* Various tables. See include/tables.h */
  47. _edata = .;
  48. }
  49. /*
  50. * The bss section
  51. *
  52. */
  53. . = ALIGN ( _max_align );
  54. .bss : {
  55. _bss = .;
  56. *(.bss)
  57. *(.bss.*)
  58. *(COMMON)
  59. _ebss = .;
  60. }
  61. /*
  62. * Weak symbols that need zero values if not otherwise defined
  63. *
  64. */
  65. .weak 0x0 : {
  66. _weak = .;
  67. *(.weak)
  68. _eweak = .;
  69. }
  70. _assert = ASSERT ( ( _weak == _eweak ), ".weak is non-zero length" );
  71. /*
  72. * Dispose of the comment and note sections to make the link map
  73. * easier to read
  74. *
  75. */
  76. /DISCARD/ : {
  77. *(.comment)
  78. *(.comment.*)
  79. *(.note)
  80. *(.note.*)
  81. *(.eh_frame)
  82. *(.eh_frame.*)
  83. *(.rel)
  84. *(.rel.*)
  85. *(.einfo)
  86. *(.einfo.*)
  87. *(.discard)
  88. }
  89. }