Build script for Windows

ld -m i386pe -M -T link.ld -o build/ultron.exe kernel/boot/boot.s.o kernel/arch/
gdt.s.o kernel/arch/idt.s.o kernel/arch/interrupt.s.o kernel/main.o kernel/core/
gdt.o kernel/core/idt.o kernel/core/io.o kernel/core/isr.o kernel/modules/timer.
o kernel/modules/keyboard.o kernel/modules/monitor.o kernel/modules/memory.o ker
nel/modules/common.o

Memory Configuration

Name             Origin             Length             Attributes
*default*        0x00000000         0xffffffff

Linker script and memory map

                0x00400000                __image_base__ = 0x400000
                0x00000000                __dll__ = 0x0
                0x00400000                ___ImageBase = 0x400000
                0x00001000                __section_alignment__ = 0x1000
                0x00000200                __file_alignment__ = 0x200
                0x00000004                __major_os_version__ = 0x4
                0x00000000                __minor_os_version__ = 0x0
                0x00000001                __major_image_version__ = 0x1
                0x00000000                __minor_image_version__ = 0x0
                0x00000004                __major_subsystem_version__ = 0x4
                0x00000000                __minor_subsystem_version__ = 0x0
                0x00000003                __subsystem__ = 0x3
                0x00200000                __size_of_stack_reserve__ = 0x200000
                0x00001000                __size_of_stack_commit__ = 0x1000
                0x00100000                __size_of_heap_reserve__ = 0x100000
                0x00001000                __size_of_heap_commit__ = 0x1000
                0x00000000                __loader_flags__ = 0x0
                0x00000000                __dll_characteristics__ = 0x0

.text           0x00100000     0x2200
                0x00100000                code = .
                0x00100000                _code = .
                0x00100000                __code = .
 *(.text)
 .text          0x00100000       0x29 kernel/boot/boot.s.o
                0x00100000                mboot
                0x00100020                start
 *fill*         0x00100029        0x7
 .text          0x00100030        0x8 kernel/arch/gdt.s.o
                0x00100030                gdt_flush
 *fill*         0x00100038        0x8
 .text          0x00100040        0x8 kernel/arch/idt.s.o
                0x00100040                idt_flush
 *fill*         0x00100048        0x8
 .text          0x00100050      0x1b5 kernel/arch/interrupt.s.o
                0x00100050                isr0
                0x0010005a                isr1
                0x00100064                isr2
                0x0010006e                isr3
                0x00100078                isr4
                0x00100082                isr5
                0x0010008c                isr6
                0x00100096                isr7
                0x001000a0                isr8
                0x001000a8                isr9
                0x001000b2                isr10
                0x001000ba                isr11
                0x001000c2                isr12
                0x001000ca                isr13
                0x001000cf                isr14
                0x001000d4                isr15
                0x001000db                isr16
                0x001000e2                isr17
                0x001000e9                isr18
                0x001000f0                isr19
                0x001000f7                isr20
                0x001000fe                isr21
                0x00100105                isr22
                0x0010010c                isr23
                0x00100113                isr24
                0x0010011a                isr25
                0x00100121                isr26
                0x00100128                isr27
                0x0010012f                isr28
                0x00100136                isr29
                0x0010013d                isr30
                0x00100144                isr31
                0x00100170                irq0
                0x00100177                irq1
                0x0010017e                irq2
                0x00100185                irq3
                0x0010018c                irq4
                0x00100193                irq5
                0x0010019a                irq6
                0x001001a1                irq7
                0x001001a8                irq8
                0x001001af                irq9
                0x001001b6                irq10
                0x001001bd                irq11
                0x001001c4                irq12
                0x001001cb                irq13
                0x001001d2                irq14
                0x001001d9                irq15
 *fill*         0x00100205        0x3
 .text          0x00100208       0x24 kernel/main.o
                0x00100208                kmain
 .text          0x0010022c      0x1b0 kernel/core/gdt.o
                0x0010022c                init_gdt()
                0x0010033d                gdt_set_gate(int, unsigned int, unsign
ed int, unsigned char, unsigned char)
 .text          0x001003dc      0x870 kernel/core/idt.o
                0x001003dc                init_idt()
                0x00100be2                idt_set_gate(unsigned char, unsigned i
nt, unsigned short, unsigned char)
 .text          0x00100c4c       0x60 kernel/core/io.o
                0x00100c4c                io::outb(unsigned short, unsigned char
)
                0x00100c6c                io::inb(unsigned short)
                0x00100c8a                io::inw(unsigned short)
 .text          0x00100cac      0x118 kernel/core/isr.o
                0x00100cac                isr_handler
                0x00100cd8                irq_handler
                0x00100da4                register_interrupt_handler(unsigned ch
ar, void (*)(registers))
 .text          0x00100dc4       0xbc kernel/modules/timer.o
                0x00100dc4                timer_callback(registers)
                0x00100e06                init_timer(unsigned int)
 .text          0x00100e80      0x250 kernel/modules/keyboard.o
                0x00100e80                init_keyboard_driver()
                0x00100ebd                keyboard_getchar()
                0x00100f04                switch_layout(keymap*)
                0x00100f12                keyboard_handler(registers)
 .text          0x001010d0      0x4f4 kernel/modules/monitor.o
                0x001010d0                monitor::init()
                0x00101100                monitor::seed(unsigned char, unsigned
char)
                0x0010112e                monitor::movecursor()
                0x001011ba                monitor::scroll()
                0x0010124a                monitor::putch(char)
                0x0010135e                monitor::clear()
                0x001013c2                monitor::write(char const*)
                0x0010140e                monitor::write_dec(int)
                0x001014f8                printj(char const*)
                0x0010152f                putch(char)
                0x0010156d                print_dec(unsigned int)
                0x001015a4                clrscr()
 .text          0x001015c4       0xa0 kernel/modules/memory.o
                0x001015c4                memcpy(void*, void const*, int)
                0x001015fe                memset(void*, char, int)
                0x00101630                memsetw(unsigned short*, unsigned shor
t, int)
 .text          0x00101664       0xa8 kernel/modules/common.o
                0x00101664                init_desc_tables()
                0x00101694                boot()
                0x00102000                . = ALIGN (0x1000)
 *fill*         0x0010170c      0x8f4
 .text$_ZN7monitor6isinitEv
                0x00102000       0x14 kernel/modules/monitor.o
                0x00102000                monitor::isinit()

.rdata          0x00103000      0x200
 .rdata         0x00103000       0x20 kernel/core/isr.o
 .rdata         0x00103020       0x10 kernel/modules/timer.o
 .rdata         0x00103030       0xbc kernel/modules/common.o
 .rdata$zzz     0x001030ec       0x14 kernel/main.o
 .rdata$zzz     0x00103100       0x14 kernel/core/gdt.o
 .rdata$zzz     0x00103114       0x14 kernel/core/idt.o
 .rdata$zzz     0x00103128       0x14 kernel/core/io.o
 .rdata$zzz     0x0010313c       0x14 kernel/core/isr.o
 .rdata$zzz     0x00103150       0x14 kernel/modules/timer.o
 .rdata$zzz     0x00103164       0x14 kernel/modules/keyboard.o
 .rdata$zzz     0x00103178       0x14 kernel/modules/monitor.o
 .rdata$zzz     0x0010318c       0x14 kernel/modules/memory.o
 .rdata$zzz     0x001031a0       0x14 kernel/modules/common.o

.data           0x001031c0     0x1000
                0x001031c0                data = .
                0x001031c0                _data = .
                0x001031c0                __data = .
 *(.data)
 .data          0x001031c0        0x0 kernel/main.o
 .data          0x001031c0        0x0 kernel/core/gdt.o
 .data          0x001031c0        0x0 kernel/core/idt.o
 .data          0x001031c0        0x0 kernel/core/io.o
 .data          0x001031c0        0x0 kernel/core/isr.o
 .data          0x001031c0        0x0 kernel/modules/timer.o
 .data          0x001031c0      0x240 kernel/modules/keyboard.o
                0x001031c0                us
                0x001032e0                gb
 .data          0x00103400        0x0 kernel/modules/monitor.o
 .data          0x00103400        0x0 kernel/modules/memory.o
 .data          0x00103400        0x0 kernel/modules/common.o
 *(.rodata)
                0x00104000                . = ALIGN (0x1000)
 *fill*         0x00103400      0xc00

.bss            0x00104000     0x1000
                0x00104000                bss = .
                0x00104000                _bss = .
                0x00104000                __bss = .
 *(.bss)
 .bss           0x00104000        0x0 kernel/main.o
 .bss           0x00104000       0x40 kernel/core/gdt.o
                0x00104000                gdt_entries
                0x00104028                gdt_ptr
 .bss           0x00104040      0x820 kernel/core/idt.o
                0x00104040                idt_entries
                0x00104840                idt_ptr
 .bss           0x00104860        0x0 kernel/core/io.o
 .bss           0x00104860      0x400 kernel/core/isr.o
                0x00104860                interrupt_handlers
 .bss           0x00104c60        0x4 kernel/modules/timer.o
                0x00104c60                tick
 *fill*         0x00104c64       0x1c
 .bss           0x00104c80      0x120 kernel/modules/keyboard.o
                0x00104c80                current_layout
                0x00104c84                keyboard_buffer_start
                0x00104c88                keyboard_buffer_end
                0x00104ca0                keyboard_buffer
 .bss           0x00104da0        0x8 kernel/modules/monitor.o
                0x00104da0                mtr
 .bss           0x00104da8        0x0 kernel/modules/memory.o
 .bss           0x00104da8        0x0 kernel/modules/common.o
                0x00105000                . = ALIGN (0x1000)
 *fill*         0x00104da8      0x258
                0x00105000                end = .
                0x00105000                _end = .
                0x00105000                __end = .
LOAD kernel/boot/boot.s.o
LOAD kernel/arch/gdt.s.o
LOAD kernel/arch/idt.s.o
LOAD kernel/arch/interrupt.s.o
LOAD kernel/main.o
LOAD kernel/core/gdt.o
LOAD kernel/core/idt.o
LOAD kernel/core/io.o
LOAD kernel/core/isr.o
LOAD kernel/modules/timer.o
LOAD kernel/modules/keyboard.o
LOAD kernel/modules/monitor.o
LOAD kernel/modules/memory.o
LOAD kernel/modules/common.o
OUTPUT(build/ultron.exe pei-i386)
Mounting disk image...
Creating device...
Created device 0: B: -> ultron.img
Notifying applications...
Done.
        1 ficheiro(s) copiado(s).
        1 ficheiro(s) copiado(s).
Notifying applications...
Flushing file buffers...
Locking volume...
Failed, forcing dismount...
Removing device...
Removing mountpoint...
Done.
Oracle VM VirtualBox Command Line Management Interface Version 3.2.12
(C) 2005-2010 Oracle Corporation
All rights reserved.

Waiting for the VM to power on...
VM has been successfully started.
DoneOK.
Prima qualquer tecla para continuar . . .This is the startup code for NT native processes.
(smss.exe, autochk.exe, csrss.exe)
