test_encl.lds 774 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. OUTPUT_FORMAT(elf64-x86-64)
  2. PHDRS
  3. {
  4. tcs PT_LOAD;
  5. text PT_LOAD;
  6. data PT_LOAD;
  7. }
  8. SECTIONS
  9. {
  10. . = 0;
  11. .tcs : {
  12. *(.tcs*)
  13. } : tcs
  14. . = ALIGN(4096);
  15. .text : {
  16. *(.text*)
  17. *(.rodata*)
  18. FILL(0xDEADBEEF);
  19. . = ALIGN(4096);
  20. } : text
  21. .data : {
  22. *(.data*)
  23. } : data
  24. /DISCARD/ : {
  25. *(.comment*)
  26. *(.note*)
  27. *(.debug*)
  28. *(.eh_frame*)
  29. }
  30. }
  31. ASSERT(!DEFINED(.altinstructions), "ALTERNATIVES are not supported in enclaves")
  32. ASSERT(!DEFINED(.altinstr_replacement), "ALTERNATIVES are not supported in enclaves")
  33. ASSERT(!DEFINED(.discard.retpoline_safe), "RETPOLINE ALTERNATIVES are not supported in enclaves")
  34. ASSERT(!DEFINED(.discard.nospec), "RETPOLINE ALTERNATIVES are not supported in enclaves")
  35. ASSERT(!DEFINED(.got.plt), "Libcalls are not supported in enclaves")