• 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: strangely plentiful linking warnings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: strangely plentiful linking warnings


  • Subject: Re: strangely plentiful linking warnings
  • From: Wade Tregaskis <email@hidden>
  • Date: Fri, 27 Aug 2004 16:37:16 +1000

Now, about those warnings... They all have the same gist, and all 187
of 'em start with "warning prebinding disabled because..."
Here are a few examples:
ld: warning prebinding disabled because (__TEXT segment (address = 0x0
size = 0x27000) of /sw/lib/libpangoxft-1.0.0.dylib overlaps with
__LINKEDIT segment (address = 0x1b000 size = 0x8000) of
/sw/lib/libatk-1.0.0.dylib
ld: warning prebinding disabled because (__DATA segment (address =
0x27000 size = 0x1000) of /sw/lib/libpangoxft-1.0.0.dylib overlaps with
__TEXT segment (address = 0x0 size = 0x6f000) of
/sw/lib/libgdk-x11-2.0.0.dylib
ld: warning prebinding disabled because (__LINKEDIT segment (address =
0x28000 size = 0xa000) of /sw/lib/libpangoxft-1.0.0.dylib overlaps with
__TEXT segment (address = 0x0 size = 0x6f000) of
/sw/lib/libgdk-x11-2.0.0.dylib

The key word in all these is "prebinding"... a quick search of Apple's website turns up a multitude of relevant links, all of which describe your problem and how to solve it. In particular see <http://developer.apple.com/documentation/Performance/Conceptual/ LaunchTime/Tasks/Prebinding.html>.


Nonetheless, the problem is that your program doesn't have a global segment offset set (XCode doesn't provide one by default on new projects), so it's conflicting with a variety of other libraries that also don't have prebinding enabled.

There are two solutions. The first is to disable prebinding for your executable, which can be done by unchecking the "Prebinding" options under "Code Styles" in the Inspector, with your project selected in the side view in XCode. The second is to provide a non-zero segment offset so as to avoid the conflicts - this can be done by entering "-seg1addr 0xZ" in the "Other Mach-O Linker Flags" field in the "Linker" settings for your target. Replace Z with some number; there are conventions on what the segment offset can be, which are listed on the web page referred to above.

Wade Tregaskis (aim: wadetregaskis, icq: 40056898)
-- Sed quis custodiet ipsos custodes?
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.


References: 
 >strangely plentiful linking warnings (From: Brian Clark <email@hidden>)

  • Prev by Date: Re: time.h vs Time.h
  • Next by Date: Re: Transfering Borland C++ to XTools
  • Previous by thread: strangely plentiful linking warnings
  • Next by thread: ANN: (free) FreePascal for Xcode Integration Kit
  • Index(es):
    • Date
    • Thread