References: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> In-Reply-To: <[EMAIL PROTECTED]>; from [EMAIL PROTECTED] on Thu, Dec 20, 2001 at 10:16:41AM -0800
Net Llama wrote: % --- [EMAIL PROTECTED] wrote: % > % > Remove unneeded symbols from binaries. "man strip" should help. % % Hopefully, Kurt won't mind if i expand a wee bit on this. Heavens no I don't mind. % Quite often, programmers compile binaries with debugging symbols left % in, so that if the binary doesn't behave the way its supposed to, they % can run a debugger against the binary to see what its doing when. % Basically, they can run the binary in slow motion, and stop it at any % time, feed it data, and generally get a much better idea of what its % doing (wrong, in most cases). % A side effect of leaving the debugging symbols in the code is that the % binary is larger in size, and will run slower. So, a lot of times, the To wit, the standard "Hello, World!" program compiled with debugging symbols (gcc -g hello.c): $ ls -l a.out -rwxr-xr-x 1 kwall users 24234 Dec 20 15:03 a.out* The standard "Hello, World!" program compiled without debugging symbols (gcc hello.c): $ ls -l a.out -rwxr-xr-x 1 kwall users 13250 Dec 20 15:03 a.out* After stripping the binary: $ strip a.out $ ls -l a.out -rwxr-xr-x 1 kwall users 2984 Dec 20 15:15 a.out* Quite the difference in size. % debugging code is removed for the final version. A few examples of this % in action are the precompiled binaries of Mozilla, which still have the % debugging code left in them, and i think the 'beta' versions of KDE. % Unfortunately, KDE is still gawd awful slow even without the debugging % code in it. Sad, but true. Kurt -- What good is having someone who can walk on water if you don't follow in his footsteps? _______________________________________________ Linux-users mailing list Archives, Digests, etc at http://linux.nf/mailman/listinfo/linux-users