Creating 32 bit binaries on a 64 bit Ubuntu
I’ve been busy spending last few days trying to get a decent non-curses based interface for IDA 64 bit but sadly there’s been no luck. I have a decent looking interface for 32 bit but since I run a 32 bit linux machine, I was sorta stuck on how to generate binaries to try my hand at reversing.
Finally I ended up finding it. It’s possible by passing the flag ‘-m32’ to gcc/g++ when compiling the program. This will generate a 32 bit binary as opposed to the 64 bit binary created default on 64 bit machines.
To do so you need to have gcc/g++ mutillib package installed for the cross compiling to happen.
sudo apt-get install gcc-multilib g++-multilib
Hopefully my next post will be how to cross compile using gcc and create a binary that works on windows. Till next time! Ciao!