Tcl Source Code

View Ticket
Login
Ticket UUID: 1231017
Title: Fedora Core: soname
Type: Patch Created on: 2005-07-01 15:24:20
Submitter: dgp Assigned to: stwo
Subsystem: 53. Configuration and Build Tools Severity: Minor
Priority: 8 Last modified: 2016-08-23 14:00:06
Status: Open Closed by: nobody
Resolution: None Closed on:
Version: None
Description:
Contributed patch from
Fedora Core distributors.

Applies to 8.4.11.
User Comments:
dgp added on 2005-07-01 22:24:20:

File Added - 140521: tcl-8.3.5-tclm4-soname.patch

mdejong added on 2005-07-27 03:00:50:
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,${@}'

dkf added on 2005-07-27 03:58:06:
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.)

jenglish added on 2005-07-27 06:42:39:
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.

Attachments: