Cygwin: Cross tools segfaulting

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
mhaggag

Cygwin: Cross tools segfaulting

Post 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
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:Cygwin: Cross tools segfaulting

Post 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?
Every good solution is obvious once you've found it.
mhaggag

Re:Cygwin: Cross tools segfaulting

Post 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.
mhaggag

Re:Cygwin: Cross tools segfaulting

Post by mhaggag »

Just in case someone bumps into this later: I was able to successfully build using an i586 targetted toolchain.
Post Reply