]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
multiboot2: Add C structure members alignment and padding consideration section
authorDaniel Kiper <daniel.kiper@oracle.com>
Wed, 8 Jun 2016 21:27:28 +0000 (23:27 +0200)
committerDaniel Kiper <daniel.kiper@oracle.com>
Wed, 14 Dec 2016 13:03:46 +0000 (14:03 +0100)
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
doc/multiboot.texi

index 1729c855d1cdea68ef2b6c79812d8b7465d85a75..0e073fa46be4d0be517de8d531c9d3f983afbff5 100644 (file)
@@ -1398,6 +1398,7 @@ document, but are included for prospective operating system and boot
 loader writers.
 
 @menu
+* C structure members alignment and padding consideration::
 * Notes on PC::                 
 * BIOS device mapping techniques::  
 * Example OS code::             
@@ -1405,6 +1406,16 @@ loader writers.
 @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
 @section Notes on PC