Advertisement
MichaelPetch

link.slidoor

May 21st, 2020
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. ENTRY(_start);
  2. OUTPUT_FORMAT(elf64-x86-64)
  3.  
  4. kern_lma = 0x100000;
  5. kern_vma = 0xFFFFFFFF80000000;
  6.  
  7. SECTIONS
  8. {
  9. . = kern_lma;
  10. .boot : { *(*.mboot*) }
  11. .usslessarch ALIGN(4K) : { *(*.uarch*) } /*This is for the lmode_start func, have to put it in the 1M mark*/
  12. .preliminargdt ALIGN(4K) : { *(*.pregdt*) } /*This is for the gdt64, instead of using rodata and being linked on higher half*/
  13. .preliminarbss ALIGN(4K) : { *(*.prebss*) }
  14. . += kern_vma;
  15. .text ALIGN(4K) : AT(ADDR(.text) - kern_vma) { *(*.text*) }
  16. .data ALIGN(4K) : AT(ADDR(.data) - kern_vma) { *(*.data*) }
  17. .rodata ALIGN(4K) : AT(ADDR(.rodata) - kern_vma) { *(*.rodata*) }
  18. .bss ALIGN(4K) : AT(ADDR(.bss) - kern_vma) { *(*.bss*) *(COMMON) }
  19. /DISCARD/ ALIGN(4K) : AT(ADDR(.rodata) - kern_vma) { *(*.comment*) /**(*.eh_frame*)*/ }
  20. kernel_end = .;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement