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. EXTERN ( _start )
  7. ENTRY ( _start )
  8. SECTIONS {
  9. /* The file starts at a virtual address of zero, and sections are
  10. * contiguous. Each section is aligned to at least _max_align,
  11. * which defaults to 32. Load addresses are equal to virtual
  12. * addresses.
  13. */
  14. _max_align = 32;
  15. /* Allow plenty of space for file headers */
  16. . = 0x1000;
  17. /*
  18. * The text section
  19. *
  20. */
  21. . = ALIGN ( _max_align );
  22. .text : {
  23. _text = .;
  24. *(.text)
  25. *(.text.*)
  26. _etext = .;
  27. }
  28. /*
  29. * The rodata section
  30. *
  31. */
  32. . = ALIGN ( _max_align );
  33. .rodata : {
  34. _rodata = .;
  35. *(.rodata)
  36. *(.rodata.*)
  37. _erodata = .;
  38. }
  39. /*
  40. * The data section
  41. *
  42. */
  43. . = ALIGN ( _max_align );
  44. .data : {
  45. _data = .;
  46. *(.data)
  47. *(.data.*)
  48. *(SORT(.tbl.*)) /* Various tables. See include/tables.h */
  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. _eweak = .;
  71. }
  72. _assert = ASSERT ( ( _weak == _eweak ), ".weak is non-zero length" );
  73. /*
  74. * Dispose of the comment and note sections to make the link map
  75. * easier to read
  76. *
  77. */
  78. /DISCARD/ : {
  79. *(.comment)
  80. *(.comment.*)
  81. *(.note)
  82. *(.note.*)
  83. *(.eh_frame)
  84. *(.eh_frame.*)
  85. *(.rel)
  86. *(.rel.*)
  87. }
  88. }