
17 Jun
2008
17 Jun
'08
7:16 p.m.
Here's something I just stumbled upon by accident: at least on Linux, GHC emits huge numbers of symbols into the binaries it generates. Here's Haddock, which I compiled without any funny debug options: $ du -h haddock-0.9 4.1M haddock-0.9 $ nm haddock-0.9 | wc -l 37938 $ strip haddock-0.9 $ du -h haddock-0.9 2.7M haddock-0.9 I happened upon this because I'm repackaging GHC 6.8.3 for Fedora, and rpmlint complained that haddock was not stripped. The RPM packager automatically strips binaries using "strip -g", but that wasn't stripping any of the abovementioned symbols. I don't know what the purpose of those symbols might be. Could someone fill me in, please? Can they actually be used for anything?