linkVM.ld
资源名称:tizos.rar [点击查看]
上传用户:qddsws
上传日期:2022-06-22
资源大小:723k
文件大小:2k
源码类别:
操作系统开发
开发平台:
C/C++
- /* We are making an elf image with embedded load adress information*/
- OUTPUT_FORMAT("elf32-i386")
- ENTRY(start)
- /*virt = 0xC0000000;*/ /* 3 gig */
- phys_loader = 0x100000; /* 1 meg */
- /*phys_kernel = 0x150000;*/ /* 1 meg */
- phys_kernel = 0x100000; /* 1 meg */
- /*virt = 0xC0050000;*/ /* 1 meg */
- virt = 0xC0000000; /* 1 meg */
- phys_realmode = 0x7C00;
- SECTIONS
- {
- __bss_start = .;
- .loader phys_loader : AT(phys_loader) {
- loader = .;
- ./build/loader.o(.text)
- ./build/loader.o(.rodata)
- ./build/high_loader.o(.text)
- ./build/high_loader.o(.rodata)
- ./build/realmode.o(.text)
- ./build/realmode.o(.rodata)
- . = ALIGN(4096);
- }
- /* Fem cuadrar l'adreca fisica i virtual del kernel,
- * el posem despres del phys loader.
- */
- actual = . ;
- phys_kernel = actual;
- virt = virt + (actual - phys_loader);
- .text virt : AT(phys_kernel ){
- code = .;
- *(.text)
- *(.rodata)
- . = ALIGN(4096);
- }
- .data : AT(phys_kernel + (data - code)) {
- data = .;
- *(.data)
- }
- .bss : AT(phys_kernel + (bss - code)) {
- bss = .;
- *(.bss)
- *(COMMON)
- }
- end = .;
- }
- OUTPUT(kernel.bin)
- INPUT(build/exception.o build/initbuses.o build/main.o build/pci.o build/pit.o build/rsi.o build/system_bus.o
- build/extern.o build/io_low_HLL.o build/memory_account.o build/pcibios.o build/pmemmanager.o build/string.o build/vbe21.o
- build/isa.o build/paging.o build/pcnet32.o build/psmouse.o build/sys_console.o
- build/idt.o build/panic.o build/pic.o build/sys_layout.o build/extra.o build/rtc.o build/ps2base.o build/pskeyboard.o
- build/rtl8029.o
- )