title: Getting GCC to compile without inserting call to memcpy
body: <p>I'm currently using GCC 4.5.3, compiled for PowerPC 440, and am compiling some code that doesn't require libc. I don't have any direct calls to memcpy(), but the compiler seems to be inserting one during the build.</p>
  
  <p>There are linker options like -nostdlib, -nostartfiles, -nodefaultlibs but I'm unable to use them as I'm not doing the linking phase. I'm only compiling. With something like this:</p>
  
  <pre><code>$ powerpc-440-eabi-gcc -O2 -g -c -o output.o input.c
  </code></pre>
  
  <p>If I check the output.o with nm, I see a reference to memcpy:</p>
  
  <pre><code>$ powerpc-440-eabi-nm output.o | grep memcpy
       U memcpy
  $ 
  </code></pre>
  
  <p>The GCC man page makes it clear how to remove calls to memcpy and other libc calls with the linker, but I don't want the compiler to insert them in the first place, as I'm using a completely different linker (not GNU's ld, and it doesn't know about libc).</p>
  
  <p>Thanks for any help you can provide.</p>