multiboot2: Add C structure members alignment and padding consideration section

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
This commit is contained in:
Daniel Kiper committed 2016-12-14 14:03:46 +01:00
1 parent 2d064744b9
commit 5409d17bd3
1 file changed
+11
+11
View File
@@ -1398,6 +1398,7 @@ document, but are included for prospective operating system and boot
loader writers. loader writers.
@menu @menu
* C structure members alignment and padding consideration::
* Notes on PC:: * Notes on PC::
* BIOS device mapping techniques:: * BIOS device mapping techniques::
* Example OS code:: * Example OS code::
@@ -1405,6 +1406,16 @@ loader writers.
@end menu @end menu
@node C structure members alignment and padding consideration
@section C structure members alignment and padding consideration
It is preferred that the structures used for communication between the bootloader
and the OS image conform to chosen ABI for a given architecture. If it is not
possible then GCC @samp{__attribute__ ((__packed__))} (or anything else which has
similar meaning for chosen C compiler) have to be added to relevant structures
definitions to avoid spurious, in this case, padding and alignment.
@node Notes on PC @node Notes on PC
@section Notes on PC @section Notes on PC