Re: Strange behaviour of linker (vc++)

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Philip Lawatsch (philip_at_waug.at)
Date: 09/27/04


Date: Mon, 27 Sep 2004 20:21:03 +0200

Igor Tandetnik wrote:

> You can force an inclusion of the symbol with /INCLUDE linker command
> line option, but that kinda defeats the purpose.

Well, I disagree. At least partially. I suppose one has reasons as to
why one would initialise a static variable via a function.

Anyway, I have tons of such things and they work fine with g++. So, is
there anything I can do to force all "dead" code into my binary? Its not
reasonable to specify every symbol per hand, this is hell a lot of work.

> Needed how? As far as linker is concerned, no outside module ever
> references this symbol, so it does not need to be included.

Yea, but there is a function wich initialises a static in there. This
function references outside stuff. So imo the linker should not discard it.

kind regards Philip



Relevant Pages

  • Re: Islams War Against the Jews
    ... Reasons are not necessarily excuses. ... There are people here with whom I disagree, ... islam or the reality of islam. ...
    (soc.culture.jewish.moderated)
  • Re: The Rating System Again
    ... What sorts of reasons might those be? ... why open your mouth about it to begin with? ... To change peoples' opinions. ... Obviously, I disagree with them. ...
    (rec.games.trading-cards.jyhad)
  • Re: Intuition and Intellection [WAS: Re: Proposed FAQ addition]
    ... the other person be interested in your reasons for a belief unless to ... thinking they're right, and one trying to convince the other failing, ... disagree, it doesn't matter any which way, to provide information about ...
    (rec.arts.sf.misc)
  • Re: OT - Non Sequitur (Ann Coulter)
    ... Assuming you disagree with most of my ... you're right about me sometimes letting my emotions get ... their reasons clearly. ... You mean like calling someone a "fucking moron" and then suddenly ...
    (alt.sports.basketball.nba.la-lakers)
  • Re: A question makes me coufused
    ... debatable question which once led to big discussion. ... except some historical reasons. ... it's reasonable for there to be the separation?" ... they disagree with. ...
    (comp.lang.lisp)