This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem about mips .data section


"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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]