Re: Alignement on ARM

2010-05-12 Thread Vincent Bernat
OoO En cette soirée bien amorcée du mardi 11 mai 2010, vers 22:41, je disais: lldpd, a program of my own, available on https://trac.luffy.cx/lldpd/ , [...] I have another alignment problem on ARM (still not related to Debian). Since I did get valuable help here last year, I

Re: Alignement on ARM

2010-05-12 Thread Bill Gatliff
On 05/12/2010 01:21 PM, Vincent Bernat wrote: While I have fixed my warnings, I am still a bit astonished that such a common code as : sa = (struct sockaddr_in *)ifa-ifa_addr; if (... sa-sin_addr ...) ... can lead to a misaligned access on ARM. Maybe there is something somewhere

Re: Alignement on ARM

2010-05-12 Thread Luca Niccoli
On 12 May 2010 20:21, Vincent Bernat ber...@debian.org wrote: Luca,     thanks    for     your     answer.    Unfortunately,     using __attribute__((aligned(2)))   would   align   the  pointer   to   struct sockaddr. I have no way to force alignment of the struct itself. Gee, I completely

Re: Alignement on ARM

2010-05-11 Thread Vincent Bernat
OoO Peu avant le début de l'après-midi du samedi 07 mars 2009, vers 13:03, je disais: lldpd, a program of my own, available on https://trac.luffy.cx/lldpd/ , [...] Hi again! I have another alignment problem on ARM (still not related to Debian). Since I did get valuable help

Re: Alignement on ARM

2010-05-11 Thread Luca Niccoli
Have you tried changing struct sockaddr *ifa_addr; with struct sockaddr *ifa_addr __attribute__((aligned(2))); in your declaration of struct ifaddrs? That attribute lets you force an arbitrary alignment for a variable. Cheers, Luca -- To UNSUBSCRIBE, email to

Alignement on ARM

2009-03-07 Thread Vincent Bernat
Hi! lldpd, a program of my own, available on https://trac.luffy.cx/lldpd/ , is doing some unaligned memory access. There is no problem on x86 but I have a user that runs into trouble with ARM. I am novice on ARM architecture. I have understood the alignment problem and I have

Re: Alignement on ARM

2009-03-07 Thread Martin Guy
On 3/7/09, Vincent Bernat ber...@debian.org wrote: lldpd, a program of my own, available on https://trac.luffy.cx/lldpd/ , is doing some unaligned memory access. What kind of ARM platform may I setup that would produce no error but incorrect data when reading unaligned int? It

Re: Alignement on ARM

2009-03-07 Thread Martin Guy
On 3/7/09, Vincent Bernat ber...@debian.org wrote: I have followed the howto available here: http://www.aurel32.net/info/debian_arm_qemu.php to setup an ARM system. However, I have no alignment issues with this platform. What kind of ARM platform may I setup that would produce no

Re: Alignement on ARM

2009-03-07 Thread Vincent Bernat
OoO Peu avant le début de l'après-midi du samedi 07 mars 2009, vers 13:40, Martin Guy martinw...@yahoo.it disait : I have followed the howto available here: http://www.aurel32.net/info/debian_arm_qemu.php to setup an ARM system. However, I have no alignment issues with this platform.

Re: Alignement on ARM

2009-03-07 Thread Martin Guy
[off list] On 3/7/09, Vincent Bernat ber...@debian.org wrote: Unfortunately, I need root access to be able to inject packets. I will try to get access to some NSLU2 platform. Mmm, not that I don't trust you but I have to guarantee the service for other users. If you get stuck, let me know,