Thread (22 messages) 22 messages, 8 authors, 2012-10-11

RE: alignment faults in 3.6

flat view

From: David Laight <hidden>
Date: 2012-10-11 10:16:16
Also in: linux-arm-kernel

Possibly related (same subject, not in this thread)

quoted
It might be enough to use __attribute__((aligned(2))) on some structure
members (actually does 'ldm' need 8 byte alignment?? - in which case
aligned(4) is enough).
The aligned attribute can only increase alignment.
Not true.
If you have:

struct foo {
    short   a;
    int     b __attribute__((aligned(2)));
    short   c;
};

You'll find sizeof (struct foo) is 8, and that, on arm/sparc etc,
gcc will generate 2 16bit accesses (and shifts) for foo.b;

	David
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help