Page 1 of 1
PE GCC Cross Compiler
Posted: Sun Mar 25, 2012 3:16 pm
by Hoozim
How would I make a GCC cross compiler to spits out PE files instead of ELF files?
Hoozim
Re: PE GCC Cross Compiler
Posted: Sun Mar 25, 2012 3:53 pm
by qw
Set the target to pe instead of elf.
Re: PE GCC Cross Compiler
Posted: Sun Mar 25, 2012 5:21 pm
by Hoozim
I tried that but I couldn't run the produced executables in the output bin.
Hoozim
Re: PE GCC Cross Compiler
Posted: Sun Mar 25, 2012 5:41 pm
by Snake
By any chance did you try to run your executables on a system that expects elf files?
Re: PE GCC Cross Compiler
Posted: Sun Mar 25, 2012 7:19 pm
by gerryg400
Hoozim wrote:I tried that but I couldn't run the produced executables in the output bin.
Hoozim
How did you try ? What does 'couldn't run' mean ? What's an 'output bin' ?
Re: PE GCC Cross Compiler
Posted: Sun Mar 25, 2012 7:24 pm
by Hoozim
What I meant to say is I am creating a GCC cross-compiler to compile newlib for my OS. I want to compile newlib into a PE format since that is what my OS supports. How do I do that since isn't newlib configured to spit out an ELF executable by default?
Hoozim
Re: PE GCC Cross Compiler
Posted: Sun Mar 25, 2012 8:46 pm
by gravaera
Yo:
Newlib is C code -- it is not biased toward any particular executable format, and the lib can be compiled into any format. Newlib isn't biased toward ELF at all.
Re: PE GCC Cross Compiler
Posted: Sun Mar 25, 2012 8:49 pm
by Brynet-Inc
Hoozim wrote:What I meant to say is I am creating a GCC cross-compiler to compile newlib for my OS. I want to compile newlib into a PE format since that is what my OS supports. How do I do that since isn't newlib configured to spit out an ELF executable by default?
Hoozim
EDIT: Removed 2015: Imageshack replaced all links with spam.