🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #133

Re: installing gcc linker (ld)

#133
From: Stevie-weave
Date: Wed, 22 Jul 1992 17:00
43 lines
2607 bytes
In article <9207221431.AA03131@tiktok.osf.org>, meissner@osf.ORG writes:
|> | 
|> |    +laser3$ ld -d -r -Bstatic -o test2.o test.o
|> |    +ld: test.o: wrong machine type
|> |    +collect: /usr/bin/ld returned 4 exit status
|> | 
|> |    However, your stated command line seems to indicate that you're
|> |    using the sparc 'ld' rather than
|> |    '/usr/local/lib/gcc-lib/sun3/2.2.2/ld' (or something to that
|> |    effect).
|> | 
|> | Actually, what's probably happening here is that collect is being
|> | installed for the cross-compiler, and collect has buried in it some
|> | hardcoded pathnames for where to find the system linker.  
|> | 
|> | You need to remove the ld in $(libsubdir)/ld and replace that with the
|> | cross-linker.  The linker in the binutils should work just find for a
|> | cross-68k environment.
|> 
|> Or alternatively, put the real linker as $(libsubdir)/real-ld, and
|> then you can happily do cross development of GCC and G++ files.  If
|> your system needs collect, and you replace 'ld' with a real linker,
|> you will not be able to use static constructors and destructors in
|> G++.
|> 
|> --
|> Michael Meissner	email: meissner@osf.org		phone: 617-621-8861
|> Open Software Foundation, 11 Cambridge Center, Cambridge, MA, 02142
|> 
|> You are in a twisty little passage of standards, all conflicting.
O.K. I got it now. According to the install stuff with gcc-2.2.2, if you
want to run the cross-loader and not the loader as a driver to the sparc
stuff, you configure with --use-gnu-ld (or something like that). However,
I get the same errors. Therefore, I built with the above option, installed
the gnu cross loader found on sprite.berkely.edu (I couldn't figure out
how to build ld out of binutils as a cross-loader) and it now works. The
only thing that bothers me now is that the loader complains about the
.so revision of libc.so..... when I load with -d -r options (not resolving
globals, etc) because the VxWorks stuff resolves at load time. Does anybody
know why?
	Thanks for your help.

sjr
Technical Details
Message-ID: <1992Jul22.170054.23775@utkux1.utk.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!mips!darwin.sura.net!wupost!emory!utkcs2!utkux1.utk.edu!laser1.engr.utk.edu!rich
References: meissner@osf.ORG <9207221431.AA03131@tiktok.osf.org>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!mips!darwin.sura.net!wupost!emory!utkcs2!utkux1.utk.edu!laser1.engr.utk.edu!rich
From: rich@laser1.engr.utk.edu (Stevie-weave)
Newsgroups: gnu.gcc.help
Subject: Re: installing gcc linker (ld)
Message-ID: <1992Jul22.170054.23775@utkux1.utk.edu>
Date: 22 Jul 92 17:00:54 GMT
References: meissner@osf.ORG <9207221431.AA03131@tiktok.osf.org>
Sender: usenet@utkux1.utk.edu (USENET News System)
Distribution: gnu
Organization: University of Tennessee ECE dept.
Lines: 43