Building for 32 bit on 64 bit OS (-m32 linker not working)
Posted: Mon Feb 12, 2018 1:27 am
Hi there,
I'm on 64bit Ubuntu OS and I'm using the GCC compiler. I'm trying to build some C code at 32bit, Not 64bit. I have set my project settings to -m32 in my linker options. In my compiler options I have added -m32 for GCC as well. However, my code is still compiling to 64 bit. For example in ym disassembly the registers are shown as: 0x000000000040084e .
My registers also begin with r not e, example rbp is ebp, rsp is esp.
Is there something I am missing in my build options? How can I fix this?
I have attached screenshots as well.
Thanks for any help.
I'm on 64bit Ubuntu OS and I'm using the GCC compiler. I'm trying to build some C code at 32bit, Not 64bit. I have set my project settings to -m32 in my linker options. In my compiler options I have added -m32 for GCC as well. However, my code is still compiling to 64 bit. For example in ym disassembly the registers are shown as: 0x000000000040084e .
My registers also begin with r not e, example rbp is ebp, rsp is esp.
Is there something I am missing in my build options? How can I fix this?
I have attached screenshots as well.
Thanks for any help.