problem with -mstructure-size-boundary=8 and network stack

JIANGJason jasonj at
Sun Apr 29 09:02:00 UTC 2012

HI all,
I am working on a porting of RTEMS 4.10.2(tried 4.9.4 also) to a S3C2440/CS8900 based SBC, and with problem to let the network stack to work.

(1) If  -mstructure-size-boundary=8 is used, data abort will be occur at ip_input.c:400 (the problem code is listed below) when there is a IP packet incoming, such as ICMP, or any other. The 

if (IA_SIN(ia)->sin_addr.s_addr == ip->ip_dst.s_addr) goto ours;

(1) If  -mstructure-size-boundary=32 is used, any IP packet out send is in abnormal format. and wireshark told me that the packet it captured are all "Bogus IP header length (0, must be at least 20)".

I am not familiar with the IP stack itself, but it looks can not be easily solved by just change the compiling options. Anyone had the same problem before? 
Best Regards, Jason


More information about the users mailing list