This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
Re: please, help me with libffi on iOS porting
Hi Andrew,
Andrew Haley wrote:
>
>> to have 4 bytes alignment. So is there a reason the alignment is
>> set to 1 byte?
>
> The doc says:
>
> `.align EXPRESSION [, EXPRESSION]'
> This is the generic .ALIGN directive. For the ARM however if the
> first argument is zero (ie no alignment is needed) the assembler
> will behave as if the argument had been 2 (ie pad to the next four
> byte boundary). This is for compatibility with ARM's own
> assembler.
>
I believe you are wrong on this point. GNU Assembler says this:
http://sourceware.org/binutils/docs/as/ARM-Directives.html
but Apple Assembler does not:
https://developer.apple.com/library/mac/#documentation/developertools/Reference/Assembler/040-Assembler_Directives/asm_directives.html
hence the generated memory alignment is wrong.
Gili
--
View this message in context: http://old.nabble.com/please%2C-help-me-with-libffi-on-iOS-porting-tp34250621p34299792.html
Sent from the Sourceware - libffi-discuss mailing list archive at Nabble.com.