<br>Hi All,<br><br>I am trying to execute a compiled simple stand-alone application ( TestApp_Memory.c compiled with gcc 4.1.0 cross compiler for ppc [ I have installed this through crosstool on a Linux PC ] ) on the ML403 Board instead of using the compiler-set provided by XPS. I tried many options ( like --static to gcc) to make the object file little as produced by the XPS Compiler Set. I find that when static is provided, the glibc is also packed up as a part of application though I never make any calls to the glibc libraries. If I dont provide the --static, the gcc produces a code assuming the library as shared and hence I get an interp section. <br>
Is there any way to produce the code&nbsp; with only the application and NOT the glibc ( As XPS compilers does). Am I missing out something. Is there any specific flags. I find even nodefaultlib does not work.<br><br>For Eg: This is another example I tried<br>
<br>int main()<br>{<br>&nbsp;&nbsp;&nbsp; int a = 5;<br>&nbsp;&nbsp;&nbsp; int b = 10;<br>&nbsp;&nbsp;&nbsp; int c = 15;<br><br>&nbsp;&nbsp;&nbsp; c = a + b;<br><br>&nbsp;&nbsp;&nbsp; c += 12;<br><br>&nbsp;&nbsp;&nbsp; return 0;<br>}<br><br>With --static compilation, size is about 500K for the above code though the useful content is too less. objdump reveals unneccessary calls to the libc.<br>
Any suggestions would be helpful.<br><br>Thanks and Regards,<br>Ramkumar<br><br><br><br><br>