If you can live with having the entire module packed without holes, you can also just compile with the pack-struct option (http://gcc.gnu.org/onlinedocs/gcc_3.html#IDX1055).