remove -m32 in command line flags
to build with 32bit binary, you have to install
sudo apt-get install gcc-multilib
and
sudo apt-get install ia32-libs-dev
More Related Contents:
- How to invoke a system call via syscall or sysenter in inline assembly?
- Is there a way to get gcc to output raw binary?
- Trying to understand gcc’s complicated stack-alignment at the top of main that copies the return address
- get string length in inline GNU Assembler
- Responsibility of stack alignment in 32-bit x86 assembly
- How do the likely/unlikely macros in the Linux kernel work and what is their benefit?
- How to add a default include path for GCC in Linux?
- Static link of shared library function in gcc
- How are the fs/gs registers used in Linux AMD64?
- How do I set the working directory of the parent process?
- What is better “int 0x80” or “syscall” in 32-bit code on Linux?
- Calling printf in x86_64 using GNU assembler
- How to determine whether a given Linux is 32 bit or 64 bit?
- Minimal executable size now 10x larger after linking than 2 years ago, for tiny programs?
- Assembly compiled executable using INT 0x80 on Ubuntu on Windows Subsystem for Linux doesn’t produce output
- How do I disassemble raw 16-bit x86 machine code?
- make -j 8 g++: internal compiler error: Killed (program cc1plus)
- Can _start be the thumb function?
- How to change the default GCC compiler in Ubuntu?
- Why do virtual memory addresses for linux binaries start at 0x8048000?
- Why can’t I mmap(MAP_FIXED) the highest virtual page in a 32-bit Linux process on a 64-bit kernel?
- How to avoid STT_GNU_IFUNC symbols in your binary?
- How can I select a static library to be linked while ARM cross compiling?
- What is the ‘soname’ option for building shared libraries for?
- Force gcc to compile 32 bit programs on 64 bit platform
- Assembly segmentation fault after making a system call, at the end of my code
- What is the default register state when program launches (asm, linux)?
- How do I compile and link a 32-bit Windows executable using mingw-w64
- Where are include files stored – Ubuntu Linux, GCC
- Does gcc have any options to add version info in ELF binary file?