On Saturday 2008-10-04 00:21, Martin Schwenke wrote: > Jan> #include <stdio.h> > Jan> /* userspace program here */ > Jan> printf("%Zu\n", __alignof__(uint64_t)); > > Jan> give on ARM? > >If I compile using the native Debian etch gcc: > > gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21) > >then it prints 4. It's what I thought. There lies the reason for all those strange issues on embedded devices ;-) You can change the XT_ALIGN macro in the kernel/include/linux/netfilter/x_tables.h and iptables/include/linux/netfilter/x_tables.h to read #ifndef roundup #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) #endif #define XT_ALIGN(s) roundup(s, sizeof(uint64_t)) and try again. There might be more alignment issues hiding, so don't expect it to fix it all in a magic whizz. >If I use the cross-compiler that I use to compile kernels (and use >--static) then it prints 8. The version is: > > arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2008q1-126) 4.2.3 > >So there does seem to be a mismatch. > >However, compiling iptables statically with the cross-compiler results >in: > > # ./iptables -L > getsockopt failed strangely: No such file or directory > >Of course, I can't strace it because it is static. stracing is independent of staticness/dynamicness. -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html