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: .objc_class_name stripped by dead code stripping (follow-up)




On Aug 18, 2006, at 5:04 AM, Greg Hurrell wrote:

Didn't receive any replies to my original post but I've noticed that one key piece of information was incorrect in the original post so going to ask again... Also if anyone has a recommendation for a more appropriate list to ask this question (objc-language?) please let me know.

The one line summary is that dead-code stripping seems to break the BUNDLE_LOADER build setting and I'd like to figure out a solution. Details follow:

I have an application and a bundle of unit tests. When building the test bundle I would like to use the BUNDLE_LOADER build setting to tell the linker to look in the application executable for undefined symbols. The trouble is that performing dead code stripping on the application strips away the symbols that the bundle needs (symbols like ".objc_class_name_MYClass"), leading to linker errors when trying to build the bundle. Is there any way to set the visibility or used flags on only those symbols? I know I can use the following for functions and other symbols, but I have not been able to find a way to apply it to Objective-C classes:

Have you tried linking the application using the -ObjC flag? I was having problems with a static library that had categories (and the dead code stripping would remove thimg), and this tells the linker to incorporate all Objective-C data into the final object, even if that Objective-C data looks unreferenced.


Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
quadrium2 | build, mutate, evolve, animate | images, textures, fractals, art



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

This email sent to email@hidden
References: 
 >.objc_class_name stripped by dead code stripping (From: Greg Hurrell <email@hidden>)
 >Re: .objc_class_name stripped by dead code stripping (follow-up) (From: Greg Hurrell <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.