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: What?



Title: Re: What?

Build Fixed-Position Application Code
By default, most code is built with the -dynamic compiler option. This option enables indirect symbol addressing and position-independent code generation, which allows the generated code to be relocated within the virtual memory space of the process. For projects such as bundles and frameworks, this option is required. The dynamic-linker must be able to relocate the bundle or framework and patch up symbol references at runtime.

Unlike bundles and frameworks, applications do not need the position-independent code generation feature provided by the
-dynamic option. Application code is never relocated within the process space. However, it does still require the indirect addressing feature to allow for dynamic linking to other code modules, such as bundles. To solve this problem, the GCC versions 3.1 and later support the -mdynamic-no-pic option, which disables position-independent code generation but allows indirect symbol addressing. You should always enable this option when building applications.

Note: In Xcode, you specify the
-mdynamic-no-pic option by choosing the Generate Position Independent Code option from the Code Generation settings.

My head is spinning.  I don’t see an option to “Generate Position Independent Code” in Xcode 2.5.  I do see a checkbox option to “Generate Position Dependent Code”.  I am building a Cocoa app which links to frameworks.  If I understand the gist of this thread, I will get a slight performance benefit if I check the option to “Generate Position Dependent Code” in the app target build settings.  Please correct me if I’m wrong.

--
Julian Vrieslander <email@hidden>
 _______________________________________________
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: 
 >Re: What? (From: Chris Espinosa <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.