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: Framework warnings



On Wednesday, October 31, 2001, at 12:42 PM, Brian Christensen wrote:

In a framework I created I did all the necessary things such as setting the executable_path and SKIP_INSTALL = YES so that I can include it in my app bundle. In this app, I also added a copy phase to include the framework, however when building it I get seven link warnings of the following sort:

/usr/bin/ld: warning prebinding disabled because (__PAGEZERO segment (address = 0x0 size = 0x1000) of /Users/brian/Developer/Projects/Alien Orb CVS/SpriteGL/Examples/SpriteGL Test/build/SpriteGL Test.app/Contents/MacOS/SpriteGL Test overlaps with __TEXT segment (address = 0x0 size = 0x2000) of @executable_path/../Frameworks/SpriteGL.framework/Versions/A/SpriteGL

The app runs fine and can use the framework without problems, but I'm wondering how I can avoid these warnings?

Read the release notes related to prebinding (specifically, /Developer/Documentation/ReleaseNotes/Prebinding.html).

What is happening is that prebinding fails because two of your frameworks are overlapping. Your app continues to run just fine, but it will launch faster if you fix this problem so prebinding can happen.

You need to set the address on one (or preferably both) of the frameworks. In the build settings for the frameworks, turn on the "use prebinding" checkbox, and add an argument like "-seg1addr 0x10000000" to the linker flags. Use a different address for the 2nd framework; make it 0x18000000 or something. There is no deep magic to these numbers, they just need to be far enough apart so nothing overlaps, and still stay in the range that Apple has said is available. (By default the address is 0, which is why your two frameworks overlap.)

(I'm sure someone who really understands the linker and loader and Mach-O could explain better, but this is all you really need to know to get the warning to go away.)

Hope this helps.

--
Kurt Revis
email@hidden


References: 
 >Framework warnings (From: Brian Christensen <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.