Maciej Grela <maciej.gr...@gmail.com> [10-11-09 18:40]:
> 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
> 

Sorry a little offtopic, but: There is kinda nonsense-humor of 
gcc in you lines. To call a program, which only consists of "void main() {}",
to be "non stripped" is - at least - "british understatement" (no
punt intended!) :) ;) X-}

Best regards,
mcc



Reply via email to