I believe this has nothing to do with big-endian. Your problem seems to be somewhat related to word-alignment. probably your memcpy, strcpy or related stuffs in your libc are broken.