coreboot-kgpe-d16/util/cbfstool
Mathias Krause d2567c8d92 cbfstool: make endian detection code more robust
Accessing the memory of a char array through a uint32_t pointer breaks
strict-aliasing rules as it dereferences memory with lower alignment
requirements than the type of the pointer requires. It's no problem on
x86 as the architecture is able to handle unaligned memory access but
other architectures are not.

Fix this by doing the test the other way around -- accessing the first
byte of a uint32_t variable though a uint8_t pointer.

Change-Id: Id340b406597014232741c98a4fd0b7c159f164c2
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Reviewed-on: http://review.coreboot.org/1234
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins)
2012-07-18 00:15:15 +02:00
..
lzma fix typo in minilzma.cc, found by Idwer. 2010-10-10 22:05:02 +00:00
cbfs-mkpayload.c correctly mark code segments as code in SELF 2012-03-07 14:20:09 +01:00
cbfs-mkstage.c remove trailing whitespace 2011-11-01 19:07:45 +01:00
cbfs.h Various fixes to cbfstool. 2011-10-24 20:29:29 +02:00
cbfstool.c cbfstool: make endian detection code more robust 2012-07-18 00:15:15 +02:00
common.c cbfstool: pretty print cmos layout files 2012-04-12 22:14:20 +02:00
common.h Various fixes to cbfstool. 2011-10-24 20:29:29 +02:00
compress.c New cbfstool. Works without mmap or fork/exec and 2009-09-14 13:29:27 +00:00
elf.h fix some wrong versions of the FSF's address (trivial) 2009-09-23 21:52:45 +00:00
EXAMPLE Since some people disapprove of white space cleanups mixed in regular commits 2010-04-27 06:56:47 +00:00
Makefile chromeos: Fix compilation of coreboot-utils package 2012-05-24 22:22:12 +02:00
Makefile.inc Build utils into their source directory equivalent in 2010-04-16 22:48:57 +00:00
swab.h Various fixes to cbfstool. 2011-10-24 20:29:29 +02:00