Fixing the unfixable autofs ABI
Posted May 3, 2012 18:46 UTC (Thu) by nybble41
In reply to: Fixing the unfixable autofs ABI
Parent article: Fixing the unfixable autofs ABI
Yes, but if you add padding fields you can ensure the same alignment on all reasonable architectures:
This way sizeof(struct fixed) is 16 bytes on i386 and x86-64. Of course, that doesn't help with the structure from this article, because the smaller i386 alignment was written into the ABI. IMHO, any structures exposed through the ABI should be naturally aligned and marked as "packed", with explicit padding fields where necessary; alignment should not be left to the compiler where ABI compatibility is a concern.
to post comments)