Skip to contentSkip to conversation

alignment errors

DISCUSSION Jaap de Jong 3 participants 3 messages Nov 12, 2010

lore
Share & tools
lore
#0 lore raw

Hi,

I'm working on a recipe for ptpd2.
When I run it on my armv5te I get traps:

[ 5034.410000] Alignment trap: ptpd2 (523) PC=0x0000e7cc Instr=0xe5870004 Address=0x0001d459 FSR 0x801

What is the best way to tackle this?
Do I have to add "__attribute__ ((packed))" on critical places?

Thanks!

#1 lore raw
Quoted 11 lines · Jaap de Jong

Hi,

I'm working on a recipe for ptpd2.
When I run it on my armv5te I get traps:

[ 5034.410000] Alignment trap: ptpd2 (523) PC=0x0000e7cc Instr=0xe5870004

Address=0x0001d459 FSR 0x801

What is the best way to tackle this?
Do I have to add "__attribute__ ((packed))" on critical places?

use addr2line or gdb (if this is inside a library) to get the method/code that is triggering that and then see what it looks like. In most cases the easiest way to get around this is to use memcpy or such.

#2 lore raw
In reply to Jaap de Jong
Quoted 11 lines · Jaap de Jong

Hi,

I'm working on a recipe for ptpd2.
When I run it on my armv5te I get traps:

[ 5034.410000] Alignment trap: ptpd2 (523) PC=0x0000e7cc Instr=0xe5870004

Address=0x0001d459 FSR 0x801

What is the best way to tackle this?
Do I have to add "__attribute__ ((packed))" on critical places?

avoid them they are inefficient and will paper over the real problem. As Holger suggest
take gdb help to debug the problem and then fix it accordingly.

Quoted 8 lines

Thanks!

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel