On Mon, Oct 08, 2012 at 09:19:04PM +0200, Albert ARIBAUD wrote: > Under option -munaligned-access, gcc can perform local char > or 16-bit array initializations using misaligned native > accesses which will throw a data abort exception. Fix files > where these array initializations were unneeded, and for > files known to contain such initializations, enforce gcc > option -mno-unaligned-access. > > Signed-off-by: Albert ARIBAUD <albert.u.b...@aribaud.net> [snip] > diff --git a/common/Makefile b/common/Makefile > index 973f05a..39dbe16 100644 > --- a/common/Makefile > +++ b/common/Makefile > @@ -232,6 +232,9 @@ $(obj)env_embedded.o: $(src)env_embedded.c > $(obj)../tools/envcrc > $(obj)../tools/envcrc: > $(MAKE) -C ../tools > > +$(obj)hush.o: CFLAGS += -mno-unaligned-access > +$(obj)fdt_support.o: CFLAGS += -mno-unaligned-access
Forgot a '# SEE doc/...' here. [snip] > +If you are reading this because of a data abort: the following MIGHT > +be relevant to your abort, if it was caused by an alignment violation. > +In order to determine this, use the PC from the abort dump along with > +an objdump -s -S of the u-boot ELF binary to locate the function where > +the abort happened; then compare this function with the examples below. You should also add something about how if you are able to reach the U-Boot prompt before the abort happens, if CONFIG_CMD_BDI is set the 'bdinfo' command will give you the relocation offset to apply to the PC. Otherwise looks good. Thanks! -- Tom
signature.asc
Description: Digital signature
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot