Skip to content

Creating 32 bit binaries on a 64 bit Ubuntu

October 16, 2011

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!



Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: