[867] in testers
VAX bogus ld errors: follow-up
daemon@ATHENA.MIT.EDU (daemon@ATHENA.MIT.EDU)
Thu May 24 20:08:49 1990
Date: Thu, 24 May 90 20:08:24 -0400
From: "Jonathan I. Kamens" <jik@pit-manager.MIT.EDU>
To: testers@ATHENA.MIT.EDU
In-Reply-To: testers[0839]
Cc: jtkohl@ATHENA.MIT.EDU
Well, I investigated jtkohl's ld bug a bit further, and here is what
I found:
* The problem only happens when -Z (Z0MAGIC) is specified.
* The error messages are being printed in the function load2(), on
line 1282 (there's also another place that prints errors, but that's
the major one) in ld.c on the Vax side. On line 1281, the values
cursym.n_value and sp->n_value differ by 1024 (the pagesize on a
Vax).
* On line 615, in the function endload(), Zflag is checked. If Zflag
is manually set to 1 at this point in dbx, then the bogus error
messages don't get printed. Note that in this case, the value
torigin is incremented by pagesize (see a pattern?).
* The reason Zflag has to be set to 1 manually at that point, is
because the function middle() gets called on line 613, and middle()
sets Zflag to 0 if rflag is set (line 956). This means, as far as I
can tell, that Zflag can *never* be 1 at line 615.
* The original Z0MAGIC sources on paris (/u3/reference/z0magic.tar.Z)
don't set Zflag to 0 in middle() when rflag is true. I don't know
why our sources do that.
* The problem may be present on the RT as well, because the function
middle() on the RT also sets Zflag to 0 if rflag is true.
I've gone just about as far as I can go with this; someone else is
going to have to do the rest of the figuring out, because it would
take me a prohibitively long amount of time to learn what I don't
currently understand about ld. I'm assuming that there are people
reading this message who know more about ld than I do, and are willing
to look at the problem :-)
jik