[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

incorrect alignment in .scommon section

From: cpp
Subject: incorrect alignment in .scommon section
Date: Tue, 9 May 2006 10:06:14 +0800


    I have a problem when building my target system. My platform is based on
BCM5836, binutils version is 2.16.1, GCC version is 3.4.6. The configuration
is as below:

binutils 2.16.1:
../configure --target=mips-elf --prefix=/usr/local/gcc3.4.6-mips-elf

../configure --target=mips-elf --prefix=/usr/local/gcc3.4.6-mips-elf
--enable-languages=c --disable-nls

The building FLAGS as below:

mips-elf-gcc -I. -Iinclude -Iproject/S20/conf/main -I  -O2 -fno-builtin
-nostdinc -fno-delete-null-pointer-checks -EB -mabi=eabi -msoft-float
-march=mips32  -c  pid.c -o project/S20/build/main/target/S20/uart-init.o

Here is the fragment of the map file:

 .scommon       0x00000000000b5cec        0x5
                           0x00000000000b5cf0                test_scommon1
 .scommon       0x00000000000b5cf1        0x5
                           0x00000000000b5cf1                test_scommon
                           0x00000000000b5cf2                test1
<------ unaligned !!!
                           0x00000000000b5cf6                PROVIDE
(__sbss_end, .)

Here is the definition of the variable:

unsigned char test_scommon;
unsigned int test1;

unsigned long mips_c0counts_per_jiffy;
unsigned char test_scommon1;

While the host system is CYGWIN :
$ gcc -v
Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs
Configured with: /gcc/gcc-3.4.4/gcc-3.4.4-1/configure --verbose
--prefix=/usr --
exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib
dir=/usr/share/man --infodir=/usr/share/info
java,objc --enable-nls --without-included-gettext
ime-libs --without-x --enable-libgcj --disable-java-awt --with-system-zlib
ble-interpreter --disable-libgcj-debug --enable-threads=posix
oehm --disable-win32-registry --enable-sjlj-exceptions
tion --enable-libstdcxx-debug : (reconfigured)
Thread model: posix
gcc version 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125)

$ ld -v
GNU ld version 2.16.91 20050610

I don't know it's a GCC's bug or binutils's.  

reply via email to

[Prev in Thread] Current Thread [Next in Thread]