[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 |
Dears,
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
GCC3.4.6:
../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
project/S20/build/main/arch/mips/_sub_arch.o
0x00000000000b5cec
mips_c0counts_per_jiffy
0x00000000000b5cf0 test_scommon1
.scommon 0x00000000000b5cf1 0x5
project/S20/build/main/target/S20/_sub_target.o
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
--man
dir=/usr/share/man --infodir=/usr/share/info
--enable-languages=c,ada,c++,d,f77,
java,objc --enable-nls --without-included-gettext
--enable-version-specific-runt
ime-libs --without-x --enable-libgcj --disable-java-awt --with-system-zlib
--ena
ble-interpreter --disable-libgcj-debug --enable-threads=posix
--enable-java-gc=b
oehm --disable-win32-registry --enable-sjlj-exceptions
--enable-hash-synchroniza
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.
- incorrect alignment in .scommon section,
cpp <=