arm .data section variable align
Michael Trimarchi
trimarchi@gandalf.sssup.it
Thu Jul 7 08:31:00 GMT 2005
Hi all,
I have same problem width my arm toolchain for arm9tdmi. If I compile this code:
char c=10;
char x[10]={1,2,3,4,5,6,7,8,9,0};
int main()
{
printf("helloworld!\n");
return 0;
}
I have a misalign of x array. I'd want a 4 byte align for the data.
000105e8 <__data_start>:
105e8: 00000000 andeq r0, r0, r0
000105ec <__dso_handle>:
105ec: 00000000 andeq r0, r0, r0
000105f0 <p.0>:
105f0: 000106d8 ldreqd r0, [r1], -r8
000105f4 <c>:
105f4: 0302010a tsteq r2, #-2147483646 ; 0x80000002
000105f5 <x>:
105f5: 04030201 streq r0, [r3], #-513
105f9: 08070605 stmeqda r7, {r0, r2, r9, sl}
105fd: Address 0x105fd is out of bounds.
But this is the result. The default behavier is it the 4 byte align?
I use
gcc-3.3.3 and binutils 2.15. My toolchain works fine except for this.
Regards
Michael
More information about the Binutils
mailing list