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?
-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.)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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,${@}'
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.)
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.