Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Fri, 12 Jul 2002 18:03:37 +0400 From: egor duda Reply-To: egor duda Organization: deo X-Priority: 3 (Normal) Message-ID: <8783643973.20020712180337@logos-m.ru> To: Wolfgang Hesseler CC: cygwin AT cygwin DOT com Subject: Re: Bug: BSS segment in COFF files In-Reply-To: <9382195250.20020712173928@logos-m.ru> References: <3D2EA2E2 DOT 2881 AT multimediaware DOT com> <8772121004 DOT 20020712145134 AT logos-m DOT ru> <3D2EBFC2 DOT 6973 AT multimediaware DOT com> <9975891676 DOT 20020712155424 AT logos-m DOT ru> <3D2EC616 DOT 19DA AT multimediaware DOT com> <9382195250 DOT 20020712173928 AT logos-m DOT ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi! Friday, 12 July, 2002 egor duda deo AT logos-m DOT ru wrote: ed> Friday, 12 July, 2002 Wolfgang Hesseler qv AT multimediaware DOT com wrote: >>> >> If you run gcc with '--save-temps' flag, and then look into >>> >> 'yourfile.s' file, you'll see that uninitialized data is tagged as >>> >> "common" (using '.comm' directive) and is put to bss only by linker >>> >> when final executable is created. To turn this feature off, use >>> >> '-fno-common' flag when compiling your object file. >>> >>> WH> This works, however only if the variables are non-static. If a >>> WH> variable is static the .comm directive is still used. >>> >>> .lcomm, to be precise. >>> >>> That's easy to work around. Just add 'int dummy;' to your source >>> file compiled with gcc, and you have 4 bytes in bss section. WH>> But how does this help? The other static variables still use WH>> the .lcomm directive. Hmm. I should have checked first. I'm wrong. Variables declared as .lcomm _are_ put into .bss section in .o file. ed> The problem seems to be that you can't reference to static variable ed> from within the module. [...] Egor. mailto:deo AT logos-m DOT ru ICQ 5165414 FidoNet 2:5020/496.19 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/