[gnu.utils.bug] ld

karl@mote.umb.edu ("Karl Berry.") (01/21/89)

This is on a Sun 3 running 3.4, but I don't think it matters.

Apparently by design, ld does not print undefined references in
libraries. (The first if in the for loop in `each_full_file'. I
know `each_full_file' is used from several places, but the one
that caused the trouble was the call in `do_warnings'. This is all
with the December 7 (or whatever was on prep two days, I lost
the date, unfortunately) version of ld, but the previous version
had this problem also.)

Here is what happened: I had an archive file which had been
compiled with gcc 1.31. One of the files in it referenced
__fixunsdfi, one of the routines in gnulib. I was happily
compiling the program that uses this library with gcc 1.32,
and when the compilation got to the load stage, all that
happened was a blank line was printed. (No output was produced.)
It wasn't hard to find that it was do_warnings that was
printing the blank line, and that I had an undefined global
symbol, but I could not figure out where it was.
Although if I ran into this problem again, I could solve it
much faster (do an ld -r, find the undefined reference, then
use -y<symbol> to find where it's used), things would have
been considerably simpler if ld had simply looked through all
the files, including libraries, for undefined references. Or
at least printed out something about a global symbol is undefined,
but it doesn't know what it is.

Karl.   karl@umb.edu

zuhn@UMN-CS.CS.UMN.EDU ("david d [zoo] zuhn") (08/03/89)

I'm running a Sequent Symmetry with Dynix (3.0.12), and I am trying to
bring up the binary utilities (tar file taken from prep 2 days ago).
Everything seems to work except for ld:  

M_386 and NMAGIC are both undefined in the final link.  Where are these
values supposed to come from?  I've tried compiling with /bin/cc and with
gcc (1.35) without any difference.

Has anyone brought this up on a '386 Sequent before, and willing to give
some advice?
-- 
David D "Zoo" Zuhn //    University of Minnesota      \\ Twin Cities
          Computer Science Systems Consultant, EE/CS 4-204
zuhn@umn-cs.cs.umn.edu,    zuhn@umn-cs.UUCP,   ..rutgers!umn-cs!zuhn

sifakis@UUNET.UU.NET (George Sifakis) (01/06/90)

I have being failing for some time to make 'ld' run on a SPARC and produce 
output which will run on a MC68020. Any hints/suggestions on how to do 
this, would be greatly appreciated.
Thanks

George Sifakis
ACUSON
11365 Shorebird
Mtn. View, CA 94043
(415)969-9112 x2365

uunet!hombre!sun!sono!sifakis