Paul Menzel (paulepanter(a)users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5388
-gerrit
commit 292e356dc139615fbd6b9fad7050abc5cb18f6ae
Author: Paul Menzel <paulepanter(a)users.sourceforge.net>
Date: Sun Mar 16 00:15:57 2014 +0100
util/cbfstool: Use `%zu` instead of `%ld` for size_t arguments
Since commit aa2f739a (cbfs: fix issues with word size and endianness.) [1]
cbfstool cannot be built anymore under 32-bit platforms.
error: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘size_t’
For arguments of size_t the conversion specifier `%zu` should to be used
instead of `%ld` as sizes are non-negative.
[1] http://review.coreboot.org/4817
Change-Id: Id84a20fbf237376a31f7e4816bd139463800c977
Signed-off-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
---
util/cbfstool/cbfs-mkstage.c | 2 +-
util/cbfstool/elfheaders.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/util/cbfstool/cbfs-mkstage.c b/util/cbfstool/cbfs-mkstage.c
index 6aa3746..eadc775 100644
--- a/util/cbfstool/cbfs-mkstage.c
+++ b/util/cbfstool/cbfs-mkstage.c
@@ -132,7 +132,7 @@ int parse_elf_to_stage(const struct buffer *input, struct buffer *output,
continue;
if (input->size < (phdr[i].p_offset + phdr[i].p_filesz)){
ERROR("Underflow copying out the segment."
- "File has %ld bytes left, segment end is %ld\n",
+ "File has %zd bytes left, segment end is %zd\n",
input->size, phdr[i].p_offset + phdr[i].p_filesz);
return -1;
}
diff --git a/util/cbfstool/elfheaders.c b/util/cbfstool/elfheaders.c
index f3ed05c..816278f 100644
--- a/util/cbfstool/elfheaders.c
+++ b/util/cbfstool/elfheaders.c
@@ -147,7 +147,7 @@ check_size(const struct buffer *b, size_t offset, size_t size, const char *desc)
if (offset >= buffer_size(b) || (offset + size) > buffer_size(b)) {
ERROR("The file is not large enough for the '%s'. "
- "%ld bytes @ offset %zu, input %zu bytes.\n",
+ "%zu bytes @ offset %zu, input %zu bytes.\n",
desc, size, offset, buffer_size(b));
return -1;
}
the following patch was just integrated into master:
commit bead811158dc73f685d1fbb15c83468249cae65c
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Wed Mar 5 16:41:27 2014 -0600
cbfstool: add symbol table parsing to the ELF parser
Optionally parse the symbol table contained within an ELF
file. It currently assumes there is only one symbol table present,
and it errors out if more than one is found.
Change-Id: I4ac4ad03184a319562576d8ab24fa620e701672a
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
See http://review.coreboot.org/5376 for details.
-gerrit
the following patch was just integrated into master:
commit c346aa65a7ce329aea76e6f5e3ec1cdbcf306956
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Wed Mar 5 14:33:42 2014 -0600
cbfstool: add string table parsing to ELF parser
Optionally parse the string tables within an ELF file.
Change-Id: I89f9da50b4fcf1fed7ac44f00c60b495c35555ef
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
See http://review.coreboot.org/5375 for details.
-gerrit
the following patch was just integrated into master:
commit db1457cba671b80b7864e8f6e986af446de19e52
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Wed Mar 5 13:57:30 2014 -0600
cbfstool: add relocation parsing to ELF parser
Optionally parse the relocation entries found within an ELF
file.
Change-Id: I343647f104901eb8a6a997ddf44aa5d36c31b44b
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
See http://review.coreboot.org/5374 for details.
-gerrit
the following patch was just integrated into master:
commit 6b57aee277b11e96876feb86b45145b811ceaf80
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Wed Mar 5 13:09:55 2014 -0600
cbfstool: introduce struct parsed_elf and parse_elf()
In order to make the ELF parsing more flexible introduce
a parse_elf() function which takes a struct parsed_elf
parameter. In addition take a flags parameter which instructs
the ELF parser as to what data within the ELF file should be
parsed.
Change-Id: I3e30e84bf8043c3df96a6ab56cd077eef2632173
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
See http://review.coreboot.org/5373 for details.
-gerrit
the following patch was just integrated into master:
commit 1b98a7a13db8718f4a8c6901ea5e5bbc868ebe7f
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Thu Mar 13 08:52:17 2014 -0500
cbfstool: remove incorrect section size check
I was overzealous in checking the section size with respect
to the file size. That check makes no sense as the section only
deals with link sizes -- not on-disk sizes. Remove the check as
it doesn't make any sense.
Change-Id: I348e7847ae3a50badc22693439614f813462445a
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
See http://review.coreboot.org/5384 for details.
-gerrit