Menu

#418 Fedora Core: soname

open
8
2008-12-18
2005-07-01
Don Porter
No

Contributed patch from
Fedora Core distributors.

Applies to 8.4.11.

Discussion

  • Don Porter

    Don Porter - 2005-07-01
     
  • Mo DeJong

    Mo DeJong - 2005-07-26

    Logged In: YES
    user_id=90858

    This patch might do something useful. Can anyone shed light
    on exactly
    what problem this patch fixes? It adds a -Wl option to the
    gcc command
    line invocation under Linux. What is wrong with the default
    shared library name?

    - SHLIB_LD="${CC} -shared"
    + SHLIB_LD='${CC} -shared -Wl,-soname,${@}'

     
  • Donal K. Fellows

    Logged In: YES
    user_id=79902

    Excerpt from the Linux 'ld' manual page

    -soname=name
    When creating an ELF shared object, set the
    internal DT_SONAME
    field to the specified name. When an
    executable is linked with a
    shared object which has a DT_SONAME field, then
    when the executable
    is run the dynamic linker will attempt to load
    the shared object
    specified by the DT_SONAME field rather than the
    using the file
    name given to the linker.

    (No, I don't know why this confers a benefit.)

     
  • Joe English

    Joe English - 2005-07-26

    Logged In: YES
    user_id=68433

    It helps in the case where you specify an absolute path to
    libtcl8.X.so when linking tclsh, wish, or other "embedding"
    application, and this library is expected to be found in a
    different location at run-time on the target platform.

    I think -soname can also used for library versioning, but
    Tcl's current library naming conventions preclude that use.

     
  • Donal K. Fellows

    • priority: 5 --> 8