Advertisement
MichaelPetch

link.ld

Sep 14th, 2019
354
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. ENTRY(_start)
  2.  
  3. SECTIONS
  4. {
  5. . = 1M;
  6. kern_start = .;
  7. KERN_VIRT_OFFSET = 0xFFFFFFFFC0000000;
  8.  
  9. .multiboot2 :
  10. {
  11. /* Ensure this is at the very beginning for sure. */
  12. *(.multiboot2)
  13. }
  14.  
  15. .earlytext :
  16. {
  17. *(.earlytext)
  18. }
  19.  
  20. .earlydata :
  21. {
  22. *(.earlydata)
  23. }
  24.  
  25. . += KERN_VIRT_OFFSET;
  26. kern_virt_start = .;
  27.  
  28. .text : AT(ADDR(.text) - KERN_VIRT_OFFSET)
  29. {
  30. *(.text*)
  31. }
  32.  
  33. .rodata : AT(ADDR(.rodata) - KERN_VIRT_OFFSET)
  34. {
  35. *(.rodata*)
  36. }
  37.  
  38. .bss : AT(ADDR(.bss) - KERN_VIRT_OFFSET)
  39. {
  40. *(.bss)
  41. }
  42.  
  43. .data : AT(ADDR(.data) - KERN_VIRT_OFFSET)
  44. {
  45. *(.data)
  46. }
  47.  
  48. kern_end = . - KERN_VIRT_OFFSET;
  49. kern_virt_end = .;
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement