Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Apr 1998 12:22:10 +0000
From:      Niall Smart <rotel@indigo.ie>
To:        hackers@FreeBSD.ORG
Subject:   ld: internal error: allocated set symbol space (2) doesn't match actual (6)
Message-ID:  <199804111122.MAA00730@indigo.ie>

next in thread | raw e-mail | index | archive | help
Hi all,

I've been getting a weird error message from ld when I link some
object files produced by g++.  I've repeated this problem with g++
2.7.2.1 and egcs-current on FreeBSD, there isn't any problem with
g++ 2.7.2.3 or egcs-current on Solaris which leads me to believe
that the problem lies with the link editor.

The problem manifests itself when I declare two variables with
file scope, the following code illustates the problem:

#include <screen.hh>

#ifdef BREAKME
CScreen		s;
#endif

int main()
{
#ifndef BREAKME
	CScreen		s;
#endif
	
	s.EnterEventLoop(0, 0);
	
	return 0;
}

[nsmart@ginseng gra]$ rm -f main.o && make MAKECXXFLAGS=-DBREAKME
g++ -g -O3 -Wall -Wno-return-type -I/usr/openwin/include -I/usr/X11R6/include -I. -DBREAKME   -c main.cc -o main.o
g++ -L/usr/X11R6/lib  screen.o main.o framebuf.o line.o algo.o -o gra -lX11 -lm
ld: internal error: allocated set symbol space (2) doesn't match actual (6)
collect2: ld returned 1 exit status
make: *** [gra] Error 1
[nsmart@ginseng gra]$ rm -f main.o && make  
g++ -g -O3 -Wall -Wno-return-type -I/usr/openwin/include -I/usr/X11R6/include -I.    -c main.cc -o main.o
g++ -L/usr/X11R6/lib  screen.o main.o framebuf.o line.o algo.o -o gra -lX11 -lm
[nsmart@ginseng gra]$


Does anyone have any ideas about what is happening here?  I can
send the source of the project or offer an account on this machine
to anyone who thinks that would be useful.

FWIW the error message is printed on line 2040 of /usr/src/gnu/usr.bin/ld.c

        if (setv_fill_count != set_sect_size/sizeof(long))
		errx(1, "internal error: allocated set symbol space (%d) "
			"doesn't match actual (%d)",
			set_sect_size/sizeof(long), setv_fill_count);


Regards,

Niall


-- 
Niall Smart.  Microsoft Suck.  See www.freebsd.org for details.
Annoy your enemies and amaze your friends:
echo "#define if(x) if(!(x))" >> /usr/include/stdio.h

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199804111122.MAA00730>