Date: Mon, 14 Sep 1998 20:21:54 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: graphix@iastate.edu (Kent Vander Velden) Cc: tlambert@primenet.com, freebsd-hackers@FreeBSD.ORG Subject: Re: Unused functions Message-ID: <199809142021.NAA26933@usr05.primenet.com> In-Reply-To: <199809140009.TAA28013@isua4.iastate.edu> from "Kent Vander Velden" at Sep 13, 98 07:09:16 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> Just so I completely understand, if I truely use only one function in from > a .o file and no other function is using anything in this .o file, the > entire .o file is still pulled into the executable? So, there are could be > a lot of unused, unreachable code in an executable. Yes, if it's statically linked, and you poorly organize your code. This is why software engineers make more money than mere programmers. > Nothing can be done to remove the bloat after the executable has > been linked? Not quite. But nothing *is* done... > Is this commonly the way its done on other systems as well? Yes. This is a compiler/linker technology issue, not a system issue. > I had always assumed that unused functions and data were tosed out. No. Only for compilers and linkers that optimize for image size and execution speed, instead of for compiler benchmarks. Q: Do you buy a compiler that is very fast, or do you buy the compiler that makes very fast code? Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809142021.NAA26933>