Overview
| Artifact ID: | 4a25ffbd40f93f00da4dec327247b38f87395ade |
|---|---|
| Ticket: | 2959713fffffffffffffffffffffffffffffffff
Link error with gcc 4.1 |
| User & Date: | dkf on 2010-03-01 17:33:12 |
Changes
- icomment:
allow_comments - 1 There are two issues. 1) Not all linkers treat symbols for structures the same as symbols for functions. 2) There's only two supported build methods in general: with stubs through the stub table pointer obtained during the call to Tcl_InitStubs (as implemented in the stub library) or without stubs through directly accessing the functions (when you link directly against the Tcl library). Consequently, the tclStubs variable is to never be exported from the library, and I see that it has the correct linkage now; good. Similarly, tclStubsPtr is also to be MODULE_SCOPE (though the module scope in question is the client library, not Tcl); again, it looks like the linkage is correct. Generally, for any symbol the linkage should be one of internal-to-function, 'static', 'MODULE_SCOPE' or 'EXTERN'. Non-function symbols should never be EXTERN because of weird linker issues (which are stupid, but not something we should try to fix; we don't want to be in the business of making full toolchains!) and hardly any function symbols should be EXTERN either. If we stick to these rules, then most of the pain goes away.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"