title: GCC error - cannot execute binary file
body: <p><strong>[Thank you everyone!., sorry i didn't see the mismatched kernel, for some reason i was thinking this was my ubuntu server 64 bit]</strong></p>
  
  <p>I compiled a custom gcc tool chain using ct-ng, compilation was successful but i wrote a simple hello world and i see this error</p>
  
  <p>Could someone, please point me what is wrong here and why i get this error?</p>
  
  <p><strong>Error:</strong></p>
  
  <pre><code>src/main$ ./main 
  bash: ./main: cannot execute binary file
  </code></pre>
  
  <p>About <strong>OS</strong></p>
  
  <pre><code>uname -a
  Linux lnx-server 3.2.0-25-generic-pae #40-Ubuntu SMP Wed May 23 22:11:24 UTC 2012 i686 i686 i386 GNU/Linux
  </code></pre>
  
  <p>Some <strong>additional info</strong> on the file</p>
  
  <pre><code>src/main$ file main
  main: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, not stripped
  </code></pre>
  
  <p><strong>File permission</strong></p>
  
  <pre><code>-rwxrwxr-x 1 balravin balravin  8276 Jul 27 17:45 main
  </code></pre>
  
  <p><strong>Command</strong> used to compile</p>
  
  <pre><code>src/main$ x86_64-mvl-linux-gnu-gcc -o main main2.c
  </code></pre>
  
  <p><strong>GCC configuration</strong></p>
  
  <blockquote>
  <pre><code>&gt; src/main$ x86_64-mvl-linux-gnu-gcc --v Using built-in specs. Target:
  &gt; x86_64-mvl-linux-gnu Configured with:
  &gt; /home/balravin/tools/platform/x86/src/gnu/gcc/4.2.4/.build/src/gcc-4.2.4/configure
  &gt; --build=i686-build_pc-linux-gnu --host=i686-build_pc-linux-gnu --target=x86_64-mvl-linux-gnu --prefix=/home/balravin/tools/platform/x86/obj/gnu/gcc/4.2.4/x86_64-mvl-linux-gnu
  &gt; --with-sysroot=/home/balravin/tools/platform/x86/obj/gnu/gcc/4.2.4/x86_64-mvl-linux-gnu/x86_64-mvl-linux-gnu/sysroot
  &gt; --enable-languages=c,c++ --disable-sjlj-exceptions --enable-__cxa_atexit --enable-libmudflap --enable-libgomp --enable-libssp --enable-threads=posix --enable-target-optspace --with-long-double-128 --disable-nls --disable-multilib --with-local-prefix=/home/balravin/tools/platform/x86/obj/gnu/gcc/4.2.4/x86_64-mvl-linux-gnu/x86_64-mvl-linux-gnu/sysroot
  &gt; --enable-c99 --enable-long-long Thread model: posix gcc version 4.2.4
  </code></pre>
  </blockquote>
  
  <p>And <strong>finally</strong> main2.c</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  int main() {
  
      printf("\nHello Work\n");
      return 0;
  }
  </code></pre>