🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.help
Article #235

problem with collect in g++ 2.x

#235
From: James Buster
Date: Fri, 11 Sep 1992 01:19
29 lines
1223 bytes
Collect appears to be working incorrectly.

Here is my understanding of how collect is supposed to work, given the command
line
	/path/collect -o t t.o -lg++

/path/real-ld -r -o /path/to/temp/file t.o -lg++

scan output of "nm -p /path/to/temp/file" to find constructors/destructors.

Create an assembly language file (/path/to/asm/file.s).

/path/to/c/compiler -c /path/to/asm/file.s -o /path/to/asm/file.o

/path/real-ld -o t /path/to/temp/file /path/to/asm/file.o

We are now finished linking. Instead, collect appears to do this:

/path/real-ld -o t t.o -lg++

Note the lack of -r, and the wrong output file name. Our linker complains
about symbols not being resolved (constructors), and the link fails. Since
the link failed, nm is never called.

This seems so wrong that either I have done something horribly wrong, or
collect is rather broken.
-- 
				James Buster
			     bitbug@netcom.com
Technical Details
Message-ID: <08tns8+.bitbug@netcom.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!csus.edu!netcom.com!bitbug

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.help
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!csus.edu!netcom.com!bitbug
From: bitbug@netcom.com (James Buster)
Subject: problem with collect in g++ 2.x
Message-ID: <08tns8+.bitbug@netcom.com>
Date: Fri, 11 Sep 92 01:19:37 GMT
Organization: Lynx Real-Time Systems, Inc.
Lines: 29