If you put the alignment on the type, not the variable, e.g.
typedef int aligned_int __attribute__((aligned(128)));
aligned_int foo;
then sizeof(foo) == 128, and the linker sees a 128-byte object,
not a 4 byte object with 128 byte alignment.
It's a subtle difference between alignment of types and alignment
of variables, but it makes sense if you think about it.
r~
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/