On 22/12/2013 17:51, O. Hartmann wrote:
> No, not precisely. The handbook
> (http://www.freebsd.org/doc/en/books/developers-handbook/policies-shlib.html)
> says that only the form libfoo.so.X.Y is supposed to be used
> (major.minor) and the ELF linker doesn't handle the minor number.

ELF use the soname. Usually (it is not required), the minor
number is not included into the soname.
The soname can be seen (on a ELF plateform) with a command
such as:
readelf -d /path/to/libfoo.so.X.Y | grep SONAME

The minor version is here to distinguish different versions
that are backward ABI compatible (ie an new one can be used
with a program compiled with an old one)

The libfoo.so symlink is used by the compiler to find the
ELF library to used when instructed with "-lfoo" to link to
the foo library.

All of before must be done for shared libraries.
But pocl is not necessarily one: when used as an ICD,
it is not loaded through its soname (recorded into the
program) but, instead, with dlopen in the ICD Loader
using the content of the /etc/OpenCL/vendors/*.icd file.
The content must be something correct for dlopen, either
a full (absolute) path to the ELF file or only the
name of the ELF file (in this case, it must be available
in the standard search path of the dynamic loader).


  What I would recommends for pocl is to stick to all of
these consideration, even when not strictly required.
So, all ELF library must have an SONAME that must be changed
when a NOT backward compatible change is introduced.
The minor version should be used to distinguish version
that are backward compatible.

  It is better if libraries are (or can be) installed into the
standard library path. For Debian, considering multiarch,
this allows to install in parallel different architectures
for the same ICD because the /etc/OpenCL/vendors/pocl.icd
file can then contain only the soname, not the full path (that
differs for different architectures).

  Regards
    Vincent

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
pocl-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pocl-devel

Reply via email to