public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/15781] New: ARM ELF - incorrectly aligned .comm data
@ 2004-06-02 18:19 gcc-bugzilla at gcc dot gnu dot org
  2004-06-02 19:49 ` [Bug target/15781] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: gcc-bugzilla at gcc dot gnu dot org @ 2004-06-02 18:19 UTC (permalink / raw)
  To: gcc-bugs

	Global data (.comm) are improperly aligned on 32-byte boundary.
	As a result, 4-byte variables occupy 32 bytes - 78% memory loss.

Environment:
System: Linux hanum.cronyx.ru 2.4.18-5aspsmp #1 SMP Sat Jul 6 19:58:36 EEST 2002 i686 unknown
Architecture: i686

host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: /soft/gnu/gcc-3.3.3/configure --prefix=/usr/local/gcc333 --disable-nls --enable-languages=c,c++,ada,java --enable-shared

How-To-Repeat:
	Compile and link the following file:

	long x;
	long y;

	_start(){}

	Look at "nm -n" output:
	00008000 T _start
	00008114 A __bss_start
	00008114 A __bss_start__
	00008114 D __data_start
	00008114 A _edata
	00008120 B x
	00008140 B y
	00008144 A __bss_end__
	00008144 A _bss_end__
	00008144 A _end
	00008144 A __end__
	00080000 ? _stack

	You can see that "x" variable takes 0x20 bytes.
------- Additional Comments From vak at hanoi dot cronyx dot ru  2004-06-02 18:19 -------
Fix:
	GCC generates ".comm" directive with alignment in bits,
	while GAS expects alignment in bytes. Fix gcc/config/arm/elf.h,
	macro ASM_OUTPUT_ALIGNED_COMMON() - divide ALIGN by 8.

-- 
           Summary: ARM ELF - incorrectly aligned .comm data
           Product: gcc
           Version: 3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: vak at hanoi dot cronyx dot ru
                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: i686-pc-linux-gnu


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


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

* [Bug target/15781] ARM ELF - incorrectly aligned .comm data
  2004-06-02 18:19 [Bug target/15781] New: ARM ELF - incorrectly aligned .comm data gcc-bugzilla at gcc dot gnu dot org
@ 2004-06-02 19:49 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-02 19:49 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-02 19:49 -------
Fixed on the mainline by:
2003-04-28  Nick Clifton  <nickc@redhat.com>

        * config/arm/elf.h (ASM_OUTPUT_ALIGNED_COMMON): Remove definition.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
 GCC target triplet|i686-pc-linux-gnu           |arm-elf
         Resolution|                            |FIXED
   Target Milestone|---                         |3.5.0


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


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

end of thread, other threads:[~2004-06-02 19:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-02 18:19 [Bug target/15781] New: ARM ELF - incorrectly aligned .comm data gcc-bugzilla at gcc dot gnu dot org
2004-06-02 19:49 ` [Bug target/15781] " 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).