Mail Archives: djgpp/1997/06/06/12:40:40

Message-Id: <>
Date: Fri, 06 Jun 1997 18:40:47 -0700
From: Daniel TAUPIN <taupin AT lps DOT u-psud DOT fr>
Reply-To: taupin AT lps DOT u-psud DOT fr
Organization: CNRS
Mime-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Eureka!

You know what? Since several days, I've bothered the djgpp users with a
lot of questions. The reason was that a huge program made errors in the
V2 version while it ran fine in V1.12.

The explanation is worth being posted (at least I think): my hyge C
program was a Fortran program translated using
f2c. And the source Fortran contained BLOCK DATA, i.e. static
initialisations of common variables. This BLOCK DAZTA was correctly
compiled ans the whole includes in a library, namely expher.a. Then, at
compilation+link I said:

gcc the-main-routine.c expher.a -othe-result

The change happened in the link editor: the V1 version linked the whiole
of the library expher.a, therefore including the C conversion of the
BLOCK DATA, but the new one is much more clever: it includes fron
expher.a only the explicitly referenced modules... and the BLOCK DATA is

==> When moving fo V2, beware of explicitly linking the modules of
static initialisations. That's all, but I spent 3 full days of 18 hours
accusing the new version of being bugged. Apologies to D.J.D.
  Daniel Taupin, Physique des Solides, Univ. Paris-Sud, 91405 ORSAY
  E-mail : mailto:taupin AT lps DOT u-psud DOT fr
  Tél: (33), Fax: (33)

- Raw text -

  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019