Mail Archives: djgpp/1997/06/06/12:40:40
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
forgotten.
==> 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) 1.69.15.60.79, Fax: (33) 1.69.15.60.86
-------------------------------------------------------------------------
- Raw text -