well i've managed to get bin utils and gcc compiled and installed, how ever i still get the same problem.
ive set the -b and -V arguments for gcc so it uses the cross compiler, also changed the reference to ld to i586-elf-ld as this seems to be the appropriate cross version also.
Now when i run ld i dont get the PE error anymore, how ever it seems i get a bunch of undefined references:
d:\programming\cygwin\home\fabian\bkerndev\Sources>i586-elf-ld -T link.ld -o ker
nel.bin start.o main.o scrn.o gdt.o idt.o isrs.o irq.o timer.o kb.o
i586-elf-ld: warning: cannot find entry symbol start; defaulting to 00100000
start.o:start.asm:(.text+0x2d): undefined reference to `_main'
start.o:start.asm:(.text+0x36): undefined reference to `_gp'
start.o:start.asm:(.text+0x53): undefined reference to `_idtp'
start.o:start.asm:(.text+0x1a3): undefined reference to `_fault_handler'
start.o:start.asm:(.text+0x26f): undefined reference to `_irq_handler'
gdt.o: In function `gdt_install':
gdt.c:(.text+0xf7): undefined reference to `gdt_flush'
idt.o: In function `idt_install':
idt.c:(.text+0x63): undefined reference to `idt_load'
isrs.o: In function `isrs_install':
isrs.c:(.text+0xb): undefined reference to `isr0'
isrs.c:(.text+0x1e): undefined reference to `isr1'
isrs.c:(.text+0x34): undefined reference to `isr2'
isrs.c:(.text+0x47): undefined reference to `isr3'
isrs.c:(.text+0x5d): undefined reference to `isr4'
isrs.c:(.text+0x70): undefined reference to `isr5'
isrs.c:(.text+0x86): undefined reference to `isr6'
isrs.c:(.text+0x99): undefined reference to `isr7'
isrs.c:(.text+0xaf): undefined reference to `isr8'
isrs.c:(.text+0xc2): undefined reference to `isr9'
isrs.c:(.text+0xd8): undefined reference to `isr10'
isrs.c:(.text+0xeb): undefined reference to `isr11'
isrs.c:(.text+0x101): undefined reference to `isr12'
isrs.c:(.text+0x114): undefined reference to `isr13'
isrs.c:(.text+0x12a): undefined reference to `isr14'
isrs.c:(.text+0x13d): undefined reference to `isr15'
isrs.c:(.text+0x153): undefined reference to `isr16'
isrs.c:(.text+0x166): undefined reference to `isr17'
isrs.c:(.text+0x17c): undefined reference to `isr18'
isrs.c:(.text+0x18f): undefined reference to `isr19'
isrs.c:(.text+0x1a5): undefined reference to `isr20'
isrs.c:(.text+0x1b8): undefined reference to `isr21'
isrs.c:(.text+0x1ce): undefined reference to `isr22'
isrs.c:(.text+0x1e1): undefined reference to `isr23'
isrs.c:(.text+0x1f7): undefined reference to `isr24'
isrs.c:(.text+0x20a): undefined reference to `isr25'
isrs.c:(.text+0x220): undefined reference to `isr26'
isrs.c:(.text+0x233): undefined reference to `isr27'
isrs.c:(.text+0x249): undefined reference to `isr28'
isrs.c:(.text+0x25c): undefined reference to `isr29'
isrs.c:(.text+0x272): undefined reference to `isr30'
isrs.c:(.text+0x285): undefined reference to `isr31'
irq.o: In function `irq_install':
irq.c:(.text+0xbb): undefined reference to `irq0'
irq.c:(.text+0xce): undefined reference to `irq1'
irq.c:(.text+0xe4): undefined reference to `irq2'
irq.c:(.text+0xf7): undefined reference to `irq3'
irq.c:(.text+0x10d): undefined reference to `irq4'
irq.c:(.text+0x120): undefined reference to `irq5'
irq.c:(.text+0x136): undefined reference to `irq6'
irq.c:(.text+0x149): undefined reference to `irq7'
irq.c:(.text+0x15f): undefined reference to `irq8'
irq.c:(.text+0x172): undefined reference to `irq9'
irq.c:(.text+0x188): undefined reference to `irq10'
irq.c:(.text+0x19b): undefined reference to `irq11'
irq.c:(.text+0x1b1): undefined reference to `irq12'
irq.c:(.text+0x1c4): undefined reference to `irq13'
irq.c:(.text+0x1da): undefined reference to `irq14'
irq.c:(.text+0x1ed): undefined reference to `irq15'
btw, im using the sample from here:
http://www.osdever.net/bkerndev/index.php
most of these are in an asm file (and prefixed with an underscore)