2010/11/9  <meino.cra...@gmx.de>:
> Hi,
>
> it is possible to run a 32-bit binary executable on a 64-bit system
> (AMD64).
>
>
> But: Is it possible to compile source code on a 64-bit system and get
> an 32-bit executable a the result ??? And if 'yes'...how???
>

gr...@kraken ~ $ cat test.c
void main() {}
gr...@kraken ~ $ gcc -o a.out.64 test.c
gr...@kraken ~ $ gcc -m32 -o a.out.32 test.c
gr...@kraken ~ $ file a.out.*
a.out.32: ELF 32-bit LSB executable, Intel 80386, version 1
(GNU/Linux), dynamically linked (uses shared libs), for GNU/Linux
2.6.9, not stripped
a.out.64: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux),
dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not
stripped
gr...@kraken ~ $

Br,
Maciej Grela

Reply via email to