coreboot/util/cbfstool
Ronald G. Minnich 4f819e8549 cbfs: fix issues with word size and endianness.
Add XDR functions and use them to convert the ELF headers
to native headers, using the Elf64 structs to ensure we accomodate
all word sizes. Also, use these XDR functions for output.

This may seem overly complex but it turned out to be much the easiest
way to do this. Note that the basic elf parsing function
in cbfs-mkstage.c now works over all ELF files, for all architectures,
endian, and word size combinations. At the same time, the basic elf parsing
in cbfs-mkstage.c is a loop that has no architecture-specific conditionals.

Add -g to the LDFLAGS while we're here. It's on the CFLAGS so there is no
harm done.

BUG=None
TEST=Build and boot for Peppy; works fine. Build and boot for nyan, works fine. Build for qemu targets and armv8 targets.
BRANCH=None

Change-Id: I5a4cee9854799189115ac701e22efc406a8d902f
Signed-off-by: Ronald G. Minnich <rminnich@google.com>
Reviewed-on: https://chromium-review.googlesource.com/178606
Reviewed-by: Ronald Minnich <rminnich@chromium.org>
Commit-Queue: Ronald Minnich <rminnich@chromium.org>
Tested-by: Ronald Minnich <rminnich@chromium.org>
2013-12-11 09:04:54 +00:00
..
lzma cbfstool: remove dead code 2013-11-14 02:38:23 +00:00
cbfs-mkpayload.c ARM: Generalize armv7 as arm. 2013-10-02 09:18:44 +00:00
cbfs-mkstage.c cbfs: fix issues with word size and endianness. 2013-12-11 09:04:54 +00:00
cbfs.h cbfstool: remove dead code 2013-11-14 02:38:23 +00:00
cbfs_image.c cbfstool: Fix architecture check when adding payload 2013-11-15 03:54:46 +00:00
cbfs_image.h cbfstool locate: Implement alignment switch --align/-a 2013-03-20 05:47:32 +01:00
cbfstool.c cbfstool: Fix architecture check when adding payload 2013-11-15 03:54:46 +00:00
coff.h GPLv2 notice: Unify all files to just use one space in »MA 02110-1301« 2013-03-01 10:16:08 +01:00
common.c cbfstool: remove dead code 2013-11-14 02:38:23 +00:00
common.h cbfs: fix issues with word size and endianness. 2013-12-11 09:04:54 +00:00
compress.c cbfstool: remove dead code 2013-11-14 02:38:23 +00:00
elf.h fix some wrong versions of the FSF's address (trivial) 2009-09-23 21:52:45 +00:00
EXAMPLE cbfstool: Update example file. 2013-02-04 11:12:15 +01:00
fit.c cbfstool: check potential microcode update earlier 2013-05-07 14:58:30 -07:00
fit.h cbfstool: Add update-fit command 2013-03-27 01:25:12 +01:00
fv.h GPLv2 notice: Unify all files to just use one space in »MA 02110-1301« 2013-03-01 10:16:08 +01:00
Makefile cbfs: fix issues with word size and endianness. 2013-12-11 09:04:54 +00:00
Makefile.inc cbfs: fix issues with word size and endianness. 2013-12-11 09:04:54 +00:00
swab.h Various fixes to cbfstool. 2011-10-24 20:29:29 +02:00
xdr.c cbfs: fix issues with word size and endianness. 2013-12-11 09:04:54 +00:00