Subject: Re: ld fails
To: Thomas Boroske <y0001006@ws.rz.tu-bs.de>
From: Mark Brinicombe <mark@causality.com>
List: port-arm32
Date: 11/17/1997 21:40:27
On Mon, 17 Nov 1997, Thomas Boroske wrote:

> Hello.
> 
> I'm not sure wether this is on-topic for this ML, but here it goes:
> 
> I recently tried to compile a short programm I had to do for a project
> at uni (originally on some Sun machine).
> It consists of several C++ source files (.cpp), all of which compiler
> fine with g++.
> However, when linking, I always get errors like 
> 
> comm.o:'__$_7Integer' referenced from text segment, but not defined
> 
> other symbol names are
> '__$_6String' and '__$_9SubString'.
> 
> The types (Integer, Sting) etc. are from the g++ library, so I checked
> with nm and found symbols like those in /usr/lib/libg++.a (.so.4.0)
> (which the programm links with via -lg++).
> 
> However, the symbols appear different, ie.
> '__$_7Integer' is '__._7Integer'
> '__$_6Sting'   is '__._6String'
> 
> This is on a netbsd-arm32-1.2G system, ie the private beta release.
> 
> Can anyone tell me what's going on ? I see no reasons why the progamm
> shouldn't link but can't get it to. Where is the symbold with the
> '__$_' coming from, and, assuming it really means the '__._' version, 
> why doesn't the compiler produce the correct ones ???
> 
> Any ideas ?

Ok this is a symbol mismatch problem ...

The . used to be used in C++ labels instead of the more usual $ symbol.
This was a carry over from ARm configs of GCC tended to use the . instead
as the ARM assembler under RiscIX etc. was not able to handle $ symbols in
labels.

>From 1.3 we use the $ as standard as gas does not impose the restrictions
on labels.

I will check put the shared library beta release  may well have had a
compiler with the change but not the libraries to match.

I will put up new versions of the g++ libraries that correctly use the $
symbol.

Cheers,
				Mark