From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Wed, 12 Feb 2014 17:30:51 +0100 Subject: [U-Boot] [PATCH] part_efi: fix protective_mbr struct allocation In-Reply-To: <663FBF285582E7408575E1A5C8B86A57ABEA7A4EC9@dor-sms-exch01.digi.com> References: <1392216053-10344-1-git-send-email-hector.palacios@digi.com> <20140212165558.100c71cb@amdc2363> <663FBF285582E7408575E1A5C8B86A57ABEA7A4EC9@dor-sms-exch01.digi.com> Message-ID: <20140212173051.04624a91@lilith> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Hector, On Wed, 12 Feb 2014 17:24:26 +0100, "Palacios, Hector" wrote: > Unfortunately this is causing unaligned access in my i.MX6. > I'm specifically passing the -mno-unaligned-access when building this file so I guess > it has to do with the macro and the packed structure. I don't think this is due to packed structures, because -mno-unaligned-access tells the compiler that unaligned fields in packed structures should be accesses by breaking the unaligned access into smaller aligned ones, so this would not cause an alignment abort. What can cause an alignment abort despite -mno-unaligned-access is dereferencing a badly aligned pointer, and this is probably what happens here. Amicalement, -- Albert.