Re: Alignement on ARM

2010-05-12 Thread Luca Niccoli
On 12 May 2010 20:21, Vincent Bernat 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 misread the code

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 t

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,

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 debian-arm-requ...@lists.debian.

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 he

Re: Alignement on ARM

2009-03-07 Thread Martin Guy
[off list] On 3/7/09, Vincent Bernat 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, as I can copy th

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 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. What kind

Re: Alignement on ARM

2009-03-07 Thread Martin Guy
On 3/7/09, Vincent Bernat 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 error but inc

Re: Alignement on ARM

2009-03-07 Thread Martin Guy
On 3/7/09, Vincent Bernat 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 depends on the se

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 mo