Hello, i downloaded a 64bit cross gcc for cygwin.(http://aireos.com/)
Is there a compiler option to generate 32bit code ?
Gcc64 => 32bit
Re:Gcc64 => 32bit
xgcc -m32 -c init.c
Assembler messages:
FATAL: can't create init.o: Invalid bfd target
Assembler messages:
FATAL: can't create init.o: Invalid bfd target
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Gcc64 => 32bit
i suggest you try "gcc -dumpspecs" and "ld --specs" make sure your copy of gcc/binutils support the model you're trying to use.
Re:Gcc64 => 32bit
Hello, can anyone tell me how to build a cross gcc for 32bit & 64bit in one compiler on cygwin ?
Re:Gcc64 => 32bit
Hello, i installed Linux Slamd64 today.
I tried use -m32 -m64 both are working with gcc.
Now i want link -m32 object file
ld -Ttext 0x10000 --oformat binary test.o
"ld: warning: i386 architecture of input file `yeah.o' is incompatible with i386:x86-64 output"
A binary file is generated.
If i compile with gcc -m32 to a.out there are no warnings
Is the generated binary file 32bit ?
I tried use -m32 -m64 both are working with gcc.
Now i want link -m32 object file
ld -Ttext 0x10000 --oformat binary test.o
"ld: warning: i386 architecture of input file `yeah.o' is incompatible with i386:x86-64 output"
A binary file is generated.
If i compile with gcc -m32 to a.out there are no warnings
Is the generated binary file 32bit ?
Re:Gcc64 => 32bit
a good way to test what type of binary a file is with the "file" command:
example:
proxy
example:
Code: Select all
$ file /usr/bin/test
/usr/bin/test: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.5, dynamically linked (uses shared libs), stripped