public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: egor duda <deo@logos-m.ru>
To: Wolfgang Hesseler <qv@multimediaware.com>
Cc: cygwin@cygwin.com
Subject: Re: Bug: BSS segment in COFF files
Date: Fri, 12 Jul 2002 08:22:00 -0000	[thread overview]
Message-ID: <8783643973.20020712180337@logos-m.ru> (raw)
In-Reply-To: <9382195250.20020712173928@logos-m.ru>

Hi!

Friday, 12 July, 2002 egor duda deo@logos-m.ru wrote:

ed> Friday, 12 July, 2002 Wolfgang Hesseler qv@multimediaware.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@logos-m.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/

      parent reply	other threads:[~2002-07-12 14:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-12  6:05 Wolfgang Hesseler
2002-07-12  6:49 ` egor duda
2002-07-12  6:56   ` Wolfgang Hesseler
2002-07-12  6:59     ` egor duda
2002-07-12  7:05       ` Wolfgang Hesseler
2002-07-12  7:52         ` egor duda
2002-07-12  8:21           ` Wolfgang Hesseler
2002-07-12  8:30             ` egor duda
2002-07-12  8:39               ` Wolfgang Hesseler
2002-07-12  8:43                 ` egor duda
2002-07-12 11:17                   ` Wolfgang Hesseler
2002-07-12  8:22           ` egor duda [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8783643973.20020712180337@logos-m.ru \
    --to=deo@logos-m.ru \
    --cc=cygwin@cygwin.com \
    --cc=qv@multimediaware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).