Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

messing with linkage



I've painted myself into sort of a corner, and I'm looking for a
specific way out. I'm sure that here exist numerous plausible
workarounds, but that's not what I'm looking for. Note that this is a
Mach-O problem rather than a MacOS problem, so I'm asking here rather
than on a MacOS mailing list even though I am working on MacOS X; I
expect a higher level of expertise with the lower level object formats
and tools here.

I have a program which links to several dylibs. If it matters, it's all
flat namespace. When it linked, each dylib's install name was either
@excutable_path/<libname> or /full/path/to/<libname>. I now want to put
these dylibs into App.app/Contents/Frameworks and set their install
names to be @executable_path/../Frameworks/<libname>, and I do so with
install_name_tool. The problem is that, as otool -L reports, the linked
program is looking for the libraries where it found them at link time,
rather than in Frameworks.

I want to change the paths the executable uses to
@executable_path/../Frameworks/<libname> just as I changed the dylibs'
install names. I haven't found a tool to do it. Is there a way (preferably
an existing tool) to, effectively, relink a program? Or just change the
paths it has stored?

--Greg
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.




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.