OSDN Git Service

Use @rpath and @loader_path to avoid absolute path
authorYing Wang <wangying@google.com>
Wed, 1 Feb 2012 21:18:20 +0000 (13:18 -0800)
committerYing Wang <wangying@google.com>
Wed, 1 Feb 2012 21:20:30 +0000 (13:20 -0800)
commit5dea692715dfe992432037c6005f91875a725841
tree178ff3ff29f5dd9336c44e628c46f14119eb045d
parent80469e4d6c9d14a8e5942260f44e1dd83a51df74
Use @rpath and @loader_path to avoid absolute path

With "-Wl,-rpath,@loader_path/../lib" the linker embeds
@loader_path/../lib as the target binary's rpath.
Here @loader_path means the path of the binary that initiates the
loading.
With "-install_name @rpath/libfoo.dylib " the linker runtime searches
libfoo.dylib in the binary's embeded rpath.

With this change you can call dlopen() without specifying the full path
of the shared library.

Change-Id: If9beb3f6f4642a377bff603bab5ba3fdb96211bf
core/combo/HOST_darwin-x86.mk