From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 11 19:41:29 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 58EB237B401 for ; Fri, 11 Apr 2003 19:41:29 -0700 (PDT) Received: from motgate.mot.com (motgate.mot.com [129.188.136.100]) by mx1.FreeBSD.org (Postfix) with ESMTP id 86D3443FAF for ; Fri, 11 Apr 2003 19:41:28 -0700 (PDT) (envelope-from rittle@latour.rsch.comm.mot.com) Received: from pobox.mot.com (pobox.mot.com [129.188.137.100]) by motgate.mot.com (Motorola/Motgate) with ESMTP id h3C2fRfl003104; Fri, 11 Apr 2003 19:41:27 -0700 (MST) Received: [from latour.rsch.comm.mot.com (latour.rsch.comm.mot.com [145.1.80.116]) by pobox.mot.com (MOT-pobox 2.0) with ESMTP id TAA20029; Fri, 11 Apr 2003 19:41:27 -0700 (MST)] Received: from latour.rsch.comm.mot.com (localhost.rsch.comm.mot.com [127.0.0.1])h3C2fQN8061883; Fri, 11 Apr 2003 21:41:26 -0500 (CDT) (envelope-from rittle@latour.rsch.comm.mot.com) Received: (from rittle@localhost) by latour.rsch.comm.mot.com (8.12.8/8.12.8/Submit) id h3C2fQCc061882; Fri, 11 Apr 2003 21:41:26 -0500 (CDT) Date: Fri, 11 Apr 2003 21:41:26 -0500 (CDT) From: Loren James Rittle Message-Id: <200304120241.h3C2fQCc061882@latour.rsch.comm.mot.com> To: hackers@freebsd.org In-Reply-To: <5.2.0.9.2.20030411082040.02604e90@194.184.65.4> Organization: Networks and Infrastructure Lab (IL02/2240), Motorola Labs cc: gmarco@giovannelli.it Subject: Re: gcc iussue or ... ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Apr 2003 02:41:29 -0000 In article <5.2.0.9.2.20030411082040.02604e90@194.184.65.4> you write: > The problem is very simple. I mantain a unix/linux port of a UO > emulator which works really fine natively under FreeBSD. Thank you for this report. Please consider this question: What versions of g++/binutils were used on the various platforms? Please know this: There is a per-platform and per-binutils version influence on mapping of program data/BSS to ELF section. g++ 3.3 with recent binutils on FreeBSD *will* allocate data as you saw on debian 3.0 (with a compiler version you didn't report). Created with g++ 3.3 (prerelease) with binutils 2.13.2.1: ; size lonewolf text data bss dec hex filename 1792215 49768 21850592 23692575 169851f lonewolf ; ls -l lonewolf -rwxr-xr-x 1 rittle wheel 1992568 Apr 11 20:18 lonewolf* Apparently, 3.2.X Created with g++ 3.2.2 built from FreeBSD ports with FreeBSD 4.7 system binuilts 2.12.1: ; size lonewolf text data bss dec hex filename 1358349 17543167 4539088 23440604 165acdc lonewolf ; ls -l lonewolf -rwxr-xr-x 1 rittle wheel 21161728 Apr 11 20:35 lonewolf* Spot checking the RedHat 8.0 system compiler which is labeled as 3.2 (but I happen to know is quite patched) with binutils 2.13+, globals.o is the tiny size. It is possible that you might find that any random version of g++ for Linux allocates data to sections differently than FreeBSD. I couldn't tell you the exact release, but others fixed/improved C++'s use of ELF sections in general (it was not as good as plain C in some areas). After the general cleanup, I went through and fixed all the remaining FreeBSD-specific bugs/issues in this area some time ago. However, I don't know if that work hit the 3.2 branch of the compiler... Regards, Loren