Advertisement
Guest User

uefi32.ld

a guest
Apr 28th, 2021
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. /* Heavily modified default linker script, for UEFI executables */
  2. /* Copyright (C) 2014-2018 Free Software Foundation, Inc.
  3. Copying and distribution of this script, with or without modification,
  4. are permitted in any medium without royalty provided the copyright
  5. notice and this notice are preserved. */
  6. OUTPUT_FORMAT(pei-i386)
  7. SECTIONS
  8. {
  9. /* Make the virtual address and file offset synced if the alignment is
  10. lower than the target page size. */
  11. . = SIZEOF_HEADERS;
  12. . = ALIGN(__section_alignment__);
  13. .text __image_base__ + ( __section_alignment__ < 0x1000 ? . : __section_alignment__ ) :
  14. {
  15. *(.text)
  16. }
  17. .data BLOCK(__section_alignment__) :
  18. {
  19. *(.data)
  20. }
  21. .rdata BLOCK(__section_alignment__) :
  22. {
  23. *(.rdata)
  24. }
  25. /* TODO: does UEFI handle .bss correctly? */
  26. .bss BLOCK(__section_alignment__) :
  27. {
  28. __bss_start__ = . ;
  29. *(.bss)
  30. *(COMMON)
  31. __bss_end__ = . ;
  32. }
  33. /DISCARD/ :
  34. {
  35. *(.pdata*)
  36. *(.edata)
  37. }
  38. .reloc BLOCK(__section_alignment__) :
  39. {
  40. *(.reloc)
  41. }
  42. }
  43.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement