Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linker question



On 4 Nov 2005, at 05:01, John Stiles wrote:

I already know which files define and reference my various symbols. What I want to know is, why does the linker think that there is a path from the entrypoint (main) to these functions? I am pretty darn positive there isn't such a path, since like I said, I even went so far as to comment out all references to these functions from the main code. At that point, you can remove the cpp's in question and the app compiles/links fine (of course, it doesn't run since I've commented out crucial logic); if you put the cpp's back, they start showing up in "nm" dumps, even though the app is still not referencing the code.


I'm stumped; I'm pretty positive this is just a linker bug. It would be great if there were an option to have the linker show a debug log like this when it is dead stripping:

_start: entrypoint
_start: references main
main: references foo
foo: references bar
bar: references YOUR_SYMBOL_HERE


Are you passing -dead_strip to ld ?

Paul

_______________________________________________
Do not post admin requests to the list. They will be ignored.
PerfOptimization-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/perfoptimization-dev/email@hidden

This email sent to email@hidden
References: 
 >RE: Linker question (From: "Eric Postpischil" <email@hidden>)
 >Re: Linker question (From: John Stiles <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.