Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2026-11-13
11:18 • Closed ticket [3257396fff]: Remove use of --export-dynamic plus 6 other chan... artifact: 5e98277009 user: serhiy.storchaka
2014-02-21
19:12 • Ticket [3257396fff]: 1 change artifact: ff26207ce3 user: jan.nijtmans
19:06 • Ticket [3257396fff]: 1 change artifact: d693f4074e user: jan.nijtmans
2011-04-04
23:19 • Ticket [3257396fff]: 4 changes artifact: feb7bd1da5 user: hobbs
22:08 • Ticket [3257396fff]: 4 changes artifact: 79ccf4bcb4 user: nijtmans
21:58 • Ticket [3257396fff]: 4 changes artifact: f795a8ed69 user: dgp
2011-03-29
20:26 • Ticket [3257396fff]: 4 changes artifact: b6f37e1361 user: nijtmans
20:25 • Ticket [3257396fff]: 4 changes artifact: b8c2c4596a user: nijtmans
20:25 • Add attachment 3257396.patch to ticket [3257396fff] artifact: 210c3c86e5 user: nijtmans
13:13 • New ticket [3257396fff] Remove use of --export-dynamic. artifact: 3e839d00e0 user: nijtmans

Remove use of --export-dynamic

Closed / Rejected3257396fffffffffffffffffffffffffffffffffCreated 16 years agoUpdated 20 days ago
Descriptionplain2011-03-29 13:13:07
I couldn't explain it better than Joe English did:

2011/3/17 Joe English <[email protected]>:
> On a related note: Tcl has also flip-flopped between building
> tclsh with and without --export-dynamic / -rdynamic.
> (--export-dynamic means, roughly, "treat symbols in the
> main executable as if they were in an RTLD_GLOBAL shared
> library.")  It might be worth considering nailing this down
> as well; preferably, IMO, settling on linking tclsh and wish
> *without* --export-dynamic.
nijtmansplain2011-03-29 20:25:26
File Added - 405812: 3257396.patch
nijtmansplain2011-03-29 20:26:08
Attached patch for Tcl. For Tk and TEA it is similar.
dgpplain2011-04-04 21:58:17
Don't understand the issues involved, but
I tested the branch against the way we use
Tcl and Tk and had no troubles.
nijtmansplain2011-04-04 22:08:08
For more info regarding this, see also the thread:

https://sourceforge.net/mailarchive/forum.php?thread_name=BANLkTinW-pt91b-8w3MnzzNMu8yxnYYjhQ%40mail.gmail.com&forum_name=tcl-core
hobbsplain2011-04-04 23:19:48
[excerpted counter-point from tcl-core thread]

I do not believe this is correct.  Reading the website, it notes that

"""Normally, the dynamic symbol table contains only symbols which are used by a dynamic object. [-export-dynamic] option (when creating an ELF file) adds all symbols to the dynamic symbol table (see ld(1) for more information). You need to use this option when there are 'reverse dependencies', i.e., a DL library has unresolved symbols that by convention must be defined in the programs that intend to load these libraries."""

and then I dug up one of the old bugs that requested its addition, Tcl #218952 (Scriptics bug 2998), 8.3.0 change 2000-02-10, matching the use of -rdynamic for Linux at the time.

I believe this reverse dependency is actually important for other users.  The core tests are wholly insufficient to properly test this.  Testing this change would mean testing things like the plugin and other areas where Tcl is linked in and stubs are not necessarily used.

I recommend against this patch - it does not provide any clear value, and has certain use cases noted by former bug submitters and as indicated by the docs above.
jan.nijtmans Ticket [3257396fff]: 1 change [History diff]2014-02-21 19:06:45
jan.nijtmans Ticket [3257396fff]: 1 change [History diff]2014-02-21 19:12:19
serhiy.storchakawiki2026-11-13 11:18:44

Closing after hobbs' objection: the jn-frq-3257396 branch was never merged, and Linux builds still link with -Wl,--export-dynamic.

Log in (anonymous is fine) to add a comment.

Attachments: