• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Framework warnings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Framework warnings


  • Subject: Re: Framework warnings
  • From: Kurt Revis <email@hidden>
  • Date: Wed, 31 Oct 2001 16:32:18 -0800

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>)

  • Prev by Date: Re: NSTimeZone and Abstract Classes
  • Next by Date: Re: I broke my windows and I don't know how to apologize to them :)
  • Previous by thread: Framework warnings
  • Next by thread: deserializeBytes question
  • Index(es):
    • Date
    • Thread