From owner-freebsd-hackers Sat Apr 11 10:14:31 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA02993 for freebsd-hackers-outgoing; Sat, 11 Apr 1998 10:14:31 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from indigo.ie (nsmart@ts01-18.waterford.indigo.ie [194.125.139.81]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA02986 for ; Sat, 11 Apr 1998 10:14:25 -0700 (PDT) (envelope-from rotel@indigo.ie) Received: (from nsmart@localhost) by indigo.ie (8.8.8/8.8.7) id SAA04598; Sat, 11 Apr 1998 18:14:52 +0100 (IST) (envelope-from rotel@indigo.ie) From: Niall Smart Message-Id: <199804111714.SAA04598@indigo.ie> Date: Sat, 11 Apr 1998 18:14:51 +0000 In-Reply-To: John Polstra "Re: ld: internal error: allocated set symbol space (2) doesn't match actual (6)" (Apr 11, 10:03am) Reply-To: rotel@indigo.ie X-Mailer: Mail User's Shell (7.2.6 beta(3) 11/17/96) To: John Polstra , rotel@indigo.ie Subject: Re: ld: internal error: allocated set symbol space (2) doesn't match actual (6) Cc: hackers@FreeBSD.ORG Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Apr 11, 10:03am, John Polstra wrote: } Subject: Re: ld: internal error: allocated set symbol space (2) doesn't ma > In article <199804111122.MAA00730@indigo.ie>, > Niall Smart wrote: > > > > 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. > ... > > [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 > > This is a known problem that crops up if you combine "-g" with "-O3". > I have already asked somebody else to file a PR for it. Hrm, weird. FWIW here is the diff of the output of nm for a -O2 main.o and a -03 main.o: Thanks, that was bugging me. [nsmart@ginseng gra]$ diff -C 2 nm.* *** nm.O2 Sat Apr 11 18:12:48 1998 --- nm.O3 Sat Apr 11 18:13:04 1998 *************** *** 1,14 **** U _EnterEventLoop__7CScreenPFR7CScreencPv_vPv U __$_7CScreen ! 0000001c T __GLOBAL_$D$s 00000058 D __GLOBAL_$F$s ! 00000030 T __GLOBAL_$I$s U ___7CScreen ! 00000030 ? ___CTOR_LIST__ ! 0000001c ? ___DTOR_LIST__ 00000058 d ___FRAME_BEGIN__ 00000000 t ___gnu_compiled_cplusplus U ___main ! 00000000 T _main 00000040 D _s 00000000 t gcc2_compiled. --- 1,14 ---- U _EnterEventLoop__7CScreenPFR7CScreencPv_vPv U __$_7CScreen ! 00000010 T __GLOBAL_$D$s 00000058 D __GLOBAL_$F$s ! 00000000 T __GLOBAL_$I$s U ___7CScreen ! 00000000 T ___CTOR_LIST__ ! 00000010 T ___DTOR_LIST__ 00000058 d ___FRAME_BEGIN__ 00000000 t ___gnu_compiled_cplusplus U ___main ! 00000024 T _main 00000040 D _s 00000000 t gcc2_compiled. -- 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