Mailing Lists: Apple Mailing Lists

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

Linker question



I have written some code that I expected to be dead-stripped, but is actually being output into my final app. It's for a utility library; some clients want to use a small subset of the library, and I've written it so that the pieces ought to stand alone, but it seems that the linker doesn't want to dead-strip enough of it. Making matters worse, the actual dead-stripping behavior seems to vary on a project- by-project basis; some apps I've written dead-strip fine, while others won't.

I've actually tried modifying the app so that it won't reference my library at all; I did a search-and-replace for all the function names in the code and commented them out. Even still, in some apps, the linker was unable to do the dead-stripping. At that point it seems like it would have to be a linker bug, but I'm not really versed in the ways of GCC yet, and some of its "normal" behaviors still seem a little screwy to me. I have experimented with the target settings repeatedly; I think I've tried almost every permutation of options that seemed remotely promising.

Is there any way to ask the linker "what references function X? why did it get included in the final output?"

(I'm using Xcode 2.2DP3.)

_______________________________________________
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: 
 >Should I "manualy unfold" LoadUnaligned" function? (From: Rustam Muginov <email@hidden>)
 >Re: Should I "manualy unfold" LoadUnaligned" function? (From: Rick Berry <email@hidden>)
 >Re: Should I "manualy unfold" LoadUnaligned" function? (From: Rustam Muginov <email@hidden>)
 >Re: Should I "manualy unfold" LoadUnaligned" function? (From: Rick Berry <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.