public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/11854] New: -fdata-sections put everything into the data section not BSS
@ 2003-08-08 13:36 andrew dot lunn at ascom dot ch
  2003-08-08 16:25 ` [Bug c/11854] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: andrew dot lunn at ascom dot ch @ 2003-08-08 13:36 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11854

           Summary: -fdata-sections put everything into the data section not
                    BSS
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: andrew dot lunn at ascom dot ch
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: mips64vr-unknown-elf

~$ cat bss.c
int foo;
static int bar;
int fred=1;

~$ /opt/ecos/gnutools/mips64vr-elf-3.3.1/bin/mips64vr-elf-gcc -save-temps -o
bss.o -c bss.c -fdata-sections

~$ cat bss.s 
        .file   1 "bss.c"
        .section .mdebug.abiO64
        .previous
        .globl  fred
        .section        .sdata.fred,"aw",@progbits
        .align  2
        .type   fred, @object
        .size   fred, 4
fred:
        .word   1
        .globl  foo
        .section        .data.foo,"aw",@progbits
        .align  2
        .type   foo, @object
        .size   foo, 4
foo:
        .space  4
        .section        .data.bar,"aw",@progbits
        .align  2
        .type   bar, @object
        .size   bar, 4
bar:
        .space  4

foo and bar should be in the bss, but with -fdata-section they end up in the
data section making the executable binary huge and mostly 0's


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c/11854] -fdata-sections put everything into the data section not BSS
  2003-08-08 13:36 [Bug c/11854] New: -fdata-sections put everything into the data section not BSS andrew dot lunn at ascom dot ch
@ 2003-08-08 16:25 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-08 16:25 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11854


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-08-08 16:25 -------
On the mainline (20030728) with a cross-compiler  to mipsisa64-unknown-elf, I get the 
expected results of fred and foo being in BSS (Really sbss, I do not know if this makes a 
difference).  But with 3.3.1 (20030714) I can confirm the beviour that the report is about.

Since emitting into bss is new for 3.3, I am closing this as fixed.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-08-08 16:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-08 13:36 [Bug c/11854] New: -fdata-sections put everything into the data section not BSS andrew dot lunn at ascom dot ch
2003-08-08 16:25 ` [Bug c/11854] " pinskia at gcc dot gnu dot org

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).