Page 1 of 1

Cygwin: Cross tools segfaulting

Posted: Fri Jul 21, 2006 11:03 am
by mhaggag
Greetings,

I've been trying to get a proper OS-dev environment under Windows for a while now. The pre-built tools coming with cygwin always fail at the linking step with the infamous "PE operations on non-PE file problem".

So I tried building a cross-compiler, linker, etc by following the FAQ entry covering it--I did it for i686-elf, using binutils 2.17 and gcc, g++ 3.4.4. However, now I'm getting segfaults when linking, e.g.:

Code: Select all

i686-elf-ld  -Map bin/kernel.map -T link.ld -o bin/kernel.bin obj/kernel/start.o
 obj/kernel/main.o obj/kernel/system.o obj/kernel/vga.o obj/kernel/gdt.o obj/ker
nel/idt.o obj/kernel/isrs.o obj/kernel/irq.o obj/kernel/timer.o obj/kernel/keybo
ard.o obj/kernel/iostream.o
make: *** [bin/kernel.bin] Segmentation fault (core dumped)
make: *** Deleting file `bin/kernel.bin'
I get that no matter what output format I choose (binary or i386-elf, both reported by i686-elf-ld as "supported" targets).

Did anybody get this working with a specific bnutils/gcc version, and/or a build target?

Thanks

Re:Cygwin: Cross tools segfaulting

Posted: Fri Jul 21, 2006 1:39 pm
by Solar
binutils 2.127?
Did anybody get this working with a specific bnutils/gcc version, and/or a build target?
Aye - what little kernel I wrote some time ago worked fine with - IIRC - 2.16 and GCC 3.2. I recompiled it several times afterwards, with newer versions, just as successfully.

This is strange... any takers?

Re:Cygwin: Cross tools segfaulting

Posted: Fri Jul 21, 2006 9:58 pm
by mhaggag
Solar wrote: binutils 2.127?
Oops! I meant 2.17
I corrected it in my initial post.
Aye - what little kernel I wrote some time ago worked fine with - IIRC - 2.16 and GCC 3.2. I recompiled it several times afterwards, with newer versions, just as successfully.
Hmm..strange. Can't see why it wouldn't work for me, then.

Re:Cygwin: Cross tools segfaulting

Posted: Thu Aug 10, 2006 1:47 pm
by mhaggag
Just in case someone bumps into this later: I was able to successfully build using an i586 targetted toolchain.