This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Problem about mips .data section
- From: Ian Lance Taylor <iant at google dot com>
- To: "robert song" <robertsong dot linux at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: 08 Feb 2008 08:51:45 -0800
- Subject: Re: Problem about mips .data section
- References: <3e004f8e0802040241y28fcbce6jef6bdff06611480@mail.gmail.com>
"robert song" <robertsong.linux@gmail.com> writes:
> without -fdata-sections:
>
> 00010d20 <h_nerr>:
> 10d20: 00000005 00000000 00000000 00000000 ................
>
> 00010d30 <h_errlist>:
> 10d30: 00000c24 00000c40 00000c50 00000c6c ...$...@...P...l
> 10d40: 00000c84 00000000 00000000 00000000 ................
>
> with -fdata-sections:
>
> 00010d30 <h_errlist>:
> 10d30: 00000c30 00000c4c 00000c5c 00000c78 ...0...L...\...x
> 10d40: 00000c90 ....
>
> 00010d44 <h_nerr>:
> 10d44: 00000005 00000000 00000000 ............
I'm just guessing, but it looks like an alignment issue. It looks
like the compiler is aligning h_errlist at a 16-byte boundary. That
is causing an extra 4 zero bytes to be inserted in the "without
-fdata-sections" case.
Ian