Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: keith@csli.Stanford.EDU (Keith Nishihara)
Subject: DS3100 linker problems.
Date: 3 Jan 90 18:05:19 GMT	[thread overview]
Message-ID: <11579@csli.Stanford.EDU> (raw)

System: DecStation 3100 running Ultrix:
  Ultrix Worksystem V2.0 (Rev. 7) System #1: Mon Jul 31 15:49:08 PDT 1989
  /bin/ld: version 1.31. (strings shows dates from early 87 to 11/88).

With certain sizes of executable objects, the final linking phase introduces
illegal instructions, where the library or object module from which
those intructions were obtained is fine.  Symptom: core dump -- illegal
instruction.  Fix: alter the alignment of instructions on the pages,
by introducing some additional code early in the program: e.g.

#ifdef SPACING
	printf("This is a spacer to move the following instructions forward");
	printf("This is a spacer to move the following instructions forward");
	printf("This is a spacer to move the following instructions forward");
[perhaps 20 or 30 lines total]
	printf("This is a spacer to move the following instructions forward");
#endif

Note that if illegal instructions are observed in the code for a function,
they can be seen before _any_ instructions
have been executed (it is not a random pointer problem), and the relink with
altered alignment generates _different_ instructions for the same function
from the same identical library (the library file is _unchanged_.)


Does anyone have a definitive explanation, or better yet, a new /bin/ld
for 1.31 which works.

Neil/.		Neil%teleos.com@ai.sri.com

P.S. Many programs, including several X clients, and g++ 1.36.2, for example,
have illegal instructions which go away if you add a few printf statements
somewhere before the illegal instructions.  I cannot believe that no one
at DEC has seen this problem.  Nor can I believe a fixed version does not
exist.


                 reply	other threads:[~1990-01-03 18:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox