• 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: Linker refuses to link my dylib? Why?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linker refuses to link my dylib? Why?


  • Subject: Re: Linker refuses to link my dylib? Why?
  • From: Brian Smith <email@hidden>
  • Date: Thu, 15 Feb 2007 09:25:14 +0800


On Feb 14, 2007, at 11:36 PM, Theodore H. Smith wrote:

I'm being told that I can't link my product, for some odd reason I have no clue about. I've no idea where these __TEXT or __DATA sections come from and to be honest I don't really want to know about them ;) All I want to do is know about C++ and build a library. Anyhow I guess I will have to learn what these silly linker flags are about.

To be honest this seems to be part of the game when using compiled languages. There are other languages where this is not an issue;o)

So why am I being told these linker errors?

I got the linker errors below and my customised settings below.


cd /Users/theodore/Programming/Making/ElfData/Source
/usr/bin/g++-4.0 -o /Users/theodore/Programming/Making/ElfData/ Source/build/ElfData.build/Deployment/ElfData.build/Objects-normal/ ppc/libElfData.dylib -LElfData/Build\ Resources/Mac\ Carbon\ Mach-O \ Universal -FElfData/Build\ Resources/Mac\ Carbon\ Mach-O\ Universal -filelist /Users/theodore/Programming/Making/ElfData/ Source/build/ElfData.build/Deployment/ElfData.build/Objects-normal/ ppc/ElfData.LinkFileList -framework Carbon -arch ppc -prebind -Wl,- single_module -compatibility_version 1 -current_version 1 - install_name /usr/local/lib/libElfData.dylib -Wl,-Y,1455 - dynamiclib -mmacosx-version-min=10.3 -Wl,-dead_strip -isysroot / Developer/SDKs/MacOSX10.3.9.sdk
ld: warning prebinding disabled because (__TEXT segment (address = 0x0 size = 0x2b000) of /Users/theodore/Programming/Making/ElfData/ Source/build/ElfData.build/Deployment/ElfData.build/Objects-normal/ ppc/libElfData.dylib overlaps with __TEXT segment (address = 0x0 size = 0xc000) of /usr/lib/libgcc_s.1.dylib
ld: warning prebinding disabled because (__TEXT segment (address = 0x0 size = 0x2b000) of /Users/theodore/Programming/Making/ElfData/ Source/build/ElfData.build/Deployment/ElfData.build/Objects-normal/ ppc/libElfData.dylib overlaps with __DATA segment (address = 0xc000 size = 0x1000) of /usr/lib/libgcc_s.1.dylib

These warnings suggest that you are trying to tell the linker to assemble code segments in the same address ranges. The linker is warning you incase you actually need to assemble the code at specific memory address, for example when you compile for a custom microcontroller device, however the linker does rearrange them to addresses that don't overlap. First check if you have prebindings turned on in your settings. For 10.3 or greater, you can turn this off, which should stop these warnings. Also, you may want to look for setting that would be telling the linker to link your code to a specific memory address and change it accordingly. (Prebindings is trying to arrange everything at address 0x0 in this case.)


Brian
_______________________________________________
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


  • Follow-Ups:
    • Re: Linker refuses to link my dylib? Why?
      • From: "Theodore H. Smith" <email@hidden>
References: 
 >Linker refuses to link my dylib? Why? (From: "Theodore H. Smith" <email@hidden>)

  • Prev by Date: Re: Linker refuses to link my dylib? Why?
  • Next by Date: Re: Linker refuses to link my dylib? Why?
  • Previous by thread: Linker refuses to link my dylib? Why?
  • Next by thread: Re: Linker refuses to link my dylib? Why?
  • Index(es):
    • Date
    • Thread