Date: Tue, 15 Sep 1998 01:54:03 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: joelh@gnu.org Cc: tlambert@primenet.com, graphix@iastate.edu, freebsd-hackers@FreeBSD.ORG Subject: Re: Unused functions Message-ID: <199809150154.SAA12519@usr05.primenet.com> In-Reply-To: <199809142240.RAA09355@detlev.UUCP> from "Joel Ray Holveck" at Sep 14, 98 05:40:44 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> What can be done in the compiler and linker alone? If an object file > contains both foo() and bar(), and foo calls bar, the linker doesn't > know that. What? Then how can my definition of "printf" override the library definition? The object file format certainly knows about intra-object dependencies. > Neither does it know about static baz(), which only quux() > calls. True. > The user program doesn't call quux, and therefore doesn't call > baz, but the linker doesn't know that. False. Libraries are *not* stripped. There is also a difference between strip, strip -d, and strip -x. if -x was used, then the symbol will have been eliminated, and the code dependency will be known (or agregated). If you aim the gun at your foot and pull the trigger, it's UNIX's job to ensure reliable delivery of the bullet to where you aimed the gun (in this case, Mr. Foot). > I don't see any way to resolve the issue without instrumenting the > object file (perhaps by extending stabs?). If that were to be done, > then something similar to lorder would do the trick. That's what symbols are for. There are alread sufficient symbols tro support this (presuing you don't -x anything). 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?199809150154.SAA12519>