[PATCH] shlib: Create a default symbol version on Linux-like ELF

Adam Jackson ajax at redhat.com
Thu May 29 08:00:04 PDT 2014


When apps or other libraries link against a library with symbol
versions, the version string is recorded in the import table, and used
at runtime to resolve the symbol back to a library that provides that
version (vaguely like how two-level namespaces work in Mach-O).  ld's
--default-symver flag tags every exported symbol with a symbol version
string equal to the library's soname.  Using --default-symver means
multiple versions of libLLVM can coexist within the same process, at
least to the extent that they don't try to pass data between each
other's llvms.

As an example, imagine a language like Rust using llvm for CPU codegen,
binding to OpenGL, with Mesa as the OpenGL implementation using llvm for
R600 codegen.  With --default-symver Rust and Mesa will resolve their
llvm usage to the version each was linked against, which need not match.

(Other ELF platforms like BSD and Solaris might have similar semantics,
I've not checked.)

- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-shlib-Create-default-symbol-version-on-Linux-like-EL.patch
Type: text/x-patch
Size: 753 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140529/cfa92226/attachment.bin>


More information about the llvm-commits mailing list