Re: What?
Re: What?
- Subject: Re: What?
- From: Jean-Daniel Dupas <email@hidden>
- Date: Fri, 30 May 2008 20:37:10 +0200
Le 30 mai 08 à 20:24, Julian Vrieslander a écrit :
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>
I don't know for Xcode 2.5, but in Xcode 3 the default value is
position independant for executable, and position dependant for other
target types, so it should already have the good value.
If this is not the case, yes, it may slightly boost your app.
The fact that you see "Generate Position Dependent Code" instead of
"Generate Position Independent Code" is because the "double negation"
was confusing and an Xcode update change it.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >Re: What? (From: Julian Vrieslander <email@hidden>) |