From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15598 invoked by alias); 20 Dec 2002 17:16:11 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 15547 invoked by uid 71); 20 Dec 2002 17:16:10 -0000 Date: Fri, 20 Dec 2002 09:16:00 -0000 Message-ID: <20021220171610.15546.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Wolfgang Bangerth Subject: Re: c++/8249: Objects moved from common to BSS with -fdata-sections Reply-To: Wolfgang Bangerth X-SW-Source: 2002-12/txt/msg01109.txt.bz2 List-Id: The following reply was made to PR c++/8249; it has been noted by GNATS. From: Wolfgang Bangerth To: rittle@labs.mot.com Cc: gcc-gnats@gcc.gnu.org Subject: Re: c++/8249: Objects moved from common to BSS with -fdata-sections Date: Fri, 20 Dec 2002 11:15:12 -0600 (CST) [Let's keep cross-posting to the database, just in case someone else is interested in these mails.] On Thu, 19 Dec 2002, Loren James Rittle wrote: > In article <20021220012230.3437.qmail@sources.redhat.com>, > writes: > > > Loren, can you tell whether this still happens? I can't > > reproduce this, but admittedly I only have a Linux box, > > so maybe this is really target specific. > > Yes, with mainline built today, it still exists. Thanks for checking > results in your environment. If you don't mind, could you repeat the > following steps and e-mail the results to me. > > $ g++ -S -o tX t2.ii > $ g++ -fdata-sections -S -o tY t2.ii > $ diff tX tY > 19,20c19,32 > < .comm _ZGVZN3fooILi0EE3barEvE10double_foo,8,8 > < .comm _ZZN3fooILi0EE3barEvE10double_foo,4,4 > --- > > .globl _ZGVZN3fooILi0EE3barEvE10double_foo > > .section .bss._ZGVZN3fooILi0EE3barEvE10double_foo,"aw",@nobits > > .align 8 > > .type _ZGVZN3fooILi0EE3barEvE10double_foo, @object > > .size _ZGVZN3fooILi0EE3barEvE10double_foo, 8 > > _ZGVZN3fooILi0EE3barEvE10double_foo: > > .zero 8 > > .globl _ZZN3fooILi0EE3barEvE10double_foo > > .section .bss._ZZN3fooILi0EE3barEvE10double_foo,"aw",@nobits > > .align 4 > > .type _ZZN3fooILi0EE3barEvE10double_foo, @object > > .size _ZZN3fooILi0EE3barEvE10double_foo, 4 > > _ZZN3fooILi0EE3barEvE10double_foo: > > .zero 4 > > Knowing what Linux does might help me understand more about this > problem. Linux does properly support -fdata-sections, no? In my > case, the linker is GNU ld version 2.13 20020917 (and also tested with > GNU ld version 2.12.1 [FreeBSD] 2002-07-20). I have no idea how well Linux supports -fdata-sections. To be honest, I don't even know properly what this is about, I was just going through bug reports and checked whether they apply to my box as well and if I can contribute something :-) This is my configuration: tmp/g> ld -V GNU ld version 2.11.92.0.10 20011021 (SuSE) Supported emulations: elf_i386 i386linux tmp/g> cat /proc/version Linux version 2.4.18-4GB (root@Pentium.suse.de) (gcc version 2.95.3 20010315 (SuSE)) #1 Wed Mar 27 13:57:05 UTC 2002 And here's what I get is this (with yesterday's mainline): tmp/g> /home/bangerth/bin/gcc-3.4-CVS/bin/c++ -S -o tX t2.ii tmp/g> /home/bangerth/bin/gcc-3.4-CVS/bin/c++ -fdata-sections -S -o tY t2.ii tmp/g> diff tX tY 19,20c19,32 < .comm _ZGVZN3fooILi0EE3barEvE10double_foo,8,8 < .comm _ZZN3fooILi0EE3barEvE10double_foo,4,4 --- > .globl _ZGVZN3fooILi0EE3barEvE10double_foo > .section .bss._ZGVZN3fooILi0EE3barEvE10double_foo,"aw",@nobits > .align 8 > .type _ZGVZN3fooILi0EE3barEvE10double_foo, @object > .size _ZGVZN3fooILi0EE3barEvE10double_foo, 8 > _ZGVZN3fooILi0EE3barEvE10double_foo: > .zero 8 > .globl _ZZN3fooILi0EE3barEvE10double_foo > .section .bss._ZZN3fooILi0EE3barEvE10double_foo,"aw",@nobits > .align 4 > .type _ZZN3fooILi0EE3barEvE10double_foo, @object > .size _ZZN3fooILi0EE3barEvE10double_foo, 4 > _ZZN3fooILi0EE3barEvE10double_foo: > .zero 4 Regards Wolfgang ------------------------------------------------------------------------- Wolfgang Bangerth email: bangerth@ticam.utexas.edu www: http://www.ticam.utexas.edu/~bangerth