Subject: Re: C++ problems, in plain English :-)
To: None <mwillc@essex.ac.uk>
From: Chris G. Demetriou <cgd@pa.dec.com>
List: port-arm32
Date: 12/28/1997 12:32:57
> So I have a working RiscBSD system, the whole lot works... apart from C++
> I tried to compile a very simple Hello World type program, and got the 
> RRS text relocation at 0x1bc for "_cout" error that people have been 
> talking about.  Well I thought theres the C++ fix on the kcl ftp server, 

Is that actually an error, or just a warning?  RRS text relocations
indicate "linking problems," typically non-fatal, that will cause a
program to run less efficiently than they should.  However, in most
cases, the programs should still run.

In my shared linker, that warning is disabled.  8-)  You can do the
same to yours if you're willing to do some trivial binary editing of
/usr/libexec/ld.so.  ("Don't do it unless you know what you're doing!")



With a properly set up compiler, with the c++ shared library patch,
I'm pretty sure that the following results should be 'expected':

cc foo.cc
	compiles, fails to link because of undefined symbols.

cc foo.cc -lstdcc++
	compiles, links, binary runs correctly.

c++ foo.cc
	compiles, links, binary runs correctly.

g++ foo.cc
	compiles, and either:
		(1) fails to link because of undefined symbols, or
		(2) crashes because libg++ shared library is broken.

I'm pretty sure that all of the latter three cases should work
correctly if -static is suppoled.

Some of the 'runs correctly' cases may produce RRS text relocation
warnings, but those sholdn't be fatal.



chris