public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "michael.haubenwallner at salomon dot at" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/46072] AIX linker chokes on debug info for uninitialized static variables Date: Tue, 25 Jan 2011 13:17:00 -0000 [thread overview] Message-ID: <bug-46072-4-zBd5U4HBb8@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-46072-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46072 --- Comment #4 from Michael Haubenwallner <michael.haubenwallner at salomon dot at> 2011-01-25 12:52:22 UTC --- What exactly is the difference for gcc between not initializing a static variable and initializing it to zero? This is the difference in the generated assembler file: $ cat mytest.c static int myvar; int main(void) { return myvar; } #if defined(IVAL) static int myvar = IVAL; #endif For the compilation: $ gcc -g mytest.c -DIVAL=0 (success) $ gcc -g mytest.c ld: 0711-593 SEVERE ERROR: Symbol C_BSTAT (entry 29) in object /tmp//cc26KLXk.o: The symbol refers to a csect with symbol number 0, which was not found. The new symbol cannot be associated with a csect and is being ignored. collect2: ld returned 12 exit status (fail) For the analysis: $ gcc -g -S mytest.c -o mytestu.s $ gcc -g -S mytest.c -o mytest0.s -DIVAL=0 $ diff -u mytestu.s mytest0.s --- mytestu.s 2011-01-25 13:39:43.000000000 +0100 +++ mytest0.s 2011-01-25 13:40:01.000000000 +0100 @@ -42,7 +42,7 @@ .byte 31 .align 2 FE..main: - .bs _mytest.bss_ + .bs _mytest.rw_[RW] .stabx "myvar:S-1",myvar,133,0 .es _section_.text: Both gcc-4.5.1 and gcc-4.2.4 do make this difference.
next prev parent reply other threads:[~2011-01-25 12:52 UTC|newest] Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-10-18 18:49 [Bug debug/46072] New: " skunk at iskunk dot org 2010-10-19 21:51 ` [Bug target/46072] " skunk at iskunk dot org 2010-11-10 13:02 ` ppryor63 at gmail dot com 2011-01-25 9:28 ` michael.haubenwallner at salomon dot at 2011-01-25 13:17 ` michael.haubenwallner at salomon dot at [this message] 2011-01-25 16:23 ` michael.haubenwallner at salomon dot at 2011-02-09 9:16 ` michael.haubenwallner at salomon dot at 2011-02-24 2:21 ` pedzsan at gmail dot com 2011-03-18 17:15 ` pedzsan at gmail dot com 2011-03-18 18:57 ` skunk at iskunk dot org 2011-03-18 19:04 ` pedzsan at gmail dot com 2011-03-23 9:05 ` michael.haubenwallner at salomon dot at 2011-03-23 11:06 ` david.kirkby at onetel dot net 2011-03-23 14:53 ` pedzsan at gmail dot com 2011-03-23 17:20 ` david.kirkby at onetel dot net 2011-03-23 19:45 ` pedzsan at gmail dot com 2011-03-24 14:01 ` david.kirkby at onetel dot net 2011-04-06 8:36 ` rockdreamer at gmail dot com 2011-04-07 7:59 ` michael.haubenwallner at salomon dot at 2011-04-07 12:55 ` pedzsan at gmail dot com 2011-04-07 17:15 ` david.kirkby at onetel dot net 2011-04-08 7:54 ` michael.haubenwallner at salomon dot at 2011-04-08 19:56 ` ppryor63 at gmail dot com 2011-04-08 21:31 ` david.kirkby at onetel dot net 2011-04-12 2:38 ` david.kirkby at onetel dot net 2011-05-17 14:41 ` dje at gcc dot gnu.org 2011-05-17 15:12 ` michael.haubenwallner at salomon dot at 2011-05-17 15:41 ` david.kirkby at onetel dot net 2011-05-17 18:34 ` skunk at iskunk dot org 2011-05-18 0:49 ` ppryor63 at gmail dot com 2011-05-18 1:37 ` skunk at iskunk dot org 2011-05-20 8:19 ` mrgcc at mailinator dot com 2011-09-15 8:33 ` vovata at gmail dot com 2011-09-15 8:45 ` vovata at gmail dot com 2011-09-15 14:07 ` skunk at iskunk dot org 2011-09-15 14:17 ` vovata at gmail dot com 2012-04-12 16:31 ` skunk at iskunk dot org 2012-04-16 13:31 ` michael.haubenwallner at salomon dot at 2014-02-16 10:01 ` jackie.rosen at hushmail dot com
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=bug-46072-4-zBd5U4HBb8@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /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: linkBe 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).