Shrinky-dink Python (also, non-Unicode Python build is broken)

Paul McGuire ptmcg at austin.rr._bogus_.com
Tue Jan 17 05:36:27 CET 2006


"Larry Hastings" <larry at hastings.org> wrote in message
news:1137435559.804230.11820 at g44g2000cwa.googlegroups.com...
> Second of all, the dumb-as-a-bag-of-rocks Windows linker (at least
> the one used by VC++ under MSVS .Net 2003) *links in unused static
> symbols*.  If I want to excise the code for a module, it is not
> sufficient to comment-out the relevant _inittab line in config.c.
> Nor does it help if I comment out the "extern" prototype for the
> init function.  As far as I can tell, the only way to *really* get
> rid of a module, including all its static functions and static data,
> is to actually *remove all the code* (with comments, or #if, or
> whatnot).  What a nosebleed, huh?
>

This may not be a linker issue.  There is a C++ switch /Gy that "enables
function-level linking".  That is, without this option enabled, if any
function in a module needs to be linked, the linker goes ahead and links the
whole module.  I guess this is supposed to be some kind of linker
optimization.  The problem is that the rest of the module may introduce
additional link dependencies, thus aggravating the problem.  Perhaps
changing the C compiler to use function-level linking could address this
problem.

-- Paul





More information about the Python-list mailing list