Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-alt
Navigation:
Lists: gentoo-alt: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-alt@g.o
From: Armando Di Cianno <armando@...>
Subject: Re: [PREFIX] dynamic linking: moving the locations
Date: Wed, 11 Apr 2007 15:22:38 -0400
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Apr 11, 2007, at 3:10 PM, Fabian Groffen wrote:
> Yes we can!
> This was Solaris, Linux works the same.  Now let's check Darwin.
>
> Same test program.
<snip />
> Ok, prefix paths.  Darwin is MACH-O, which stores the full filename to
> the library in this case, so no rpath is there.  chrpath doesn't work
> here for that reason, but on Darwin, there is the install_name_tool
> tool.
<snip />
> So, install_name_tool does it a bit different than chrpath, but with
> some scripting both can do the same: change the location libraries are
> looked for.  What does this mean?  Well, let's look at this:
>
> [tefnut:/var/tmp] % install_name_tool -change /Library/Gentoo/usr/ 
> lib/libssl.0.9.8.dylib /var/tmp/libssl.0.9.8.dylib test
> [tefnut:/var/tmp] % cp /Library/Gentoo/usr/lib/libssl.0.9.8.dylib .
> [tefnut:/var/tmp] % ./test
> OpenSSL 0.9.8e 23 Feb 2007
> [tefnut:/var/tmp] % otool -L test
> test:
>         /var/tmp/libssl.0.9.8.dylib (compatibility version 0.9.8,  
> current version 0.9.8)
>         /Library/Gentoo/usr/lib/libcrypto.0.9.8.dylib  
> (compatibility version 0.9.8, current version 0.9.8)
<snip />

We use this feature, on Darwin, at lot at my company.  It's important  
to note that most binaries, on Darwin, may need to be compiled with "- 
headerpad_max_install_names" -- which is actually now antiquated / 32- 
bit only -- or, better "-headerpad [value]".

This option is needed for the cases where it's not /Y/Z -> /A/B but / 
Y/Z -> /A...A/B...B .

The fun starts with -headerpad_max_install_names when some apps think  
you're monkeying too much with the linkage options, and start to make  
only static versions.

Just, fyi.
__armando
aka fafhrd

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFGHTWB1uuRqaoClwIRAkpyAJ42YObYOFs3Xuo/UhaDYUTYooBzPgCfSh4B
HXk4ba7wefDzyftHKDqGfE0=
=7NkY
-----END PGP SIGNATURE-----
-- 
gentoo-alt@g.o mailing list


Replies:
Re: [PREFIX] dynamic linking: moving the locations
-- Fabian Groffen
References:
[PREFIX] dynamic linking: moving the locations
-- Fabian Groffen
Navigation:
Lists: gentoo-alt: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
[PREFIX] dynamic linking: moving the locations
Next by thread:
Re: [PREFIX] dynamic linking: moving the locations
Previous by date:
[PREFIX] dynamic linking: moving the locations
Next by date:
Re: [PREFIX] dynamic linking: moving the locations


Updated Jun 17, 2009

Summary: Archive of the gentoo-alt mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.