summaryrefslogtreecommitdiff
path: root/util/cbfstool/cbfs-mkpayload.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/cbfstool/cbfs-mkpayload.c')
-rw-r--r--util/cbfstool/cbfs-mkpayload.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/util/cbfstool/cbfs-mkpayload.c b/util/cbfstool/cbfs-mkpayload.c
index 4f0e248123..f8cc1616b0 100644
--- a/util/cbfstool/cbfs-mkpayload.c
+++ b/util/cbfstool/cbfs-mkpayload.c
@@ -75,8 +75,10 @@ int parse_elf_to_payload(unsigned char *input, unsigned char **output,
name = (char *)(strtab + shdr[i].sh_name);
- if (!strcmp(name, ".note.pinfo"))
+ if (!strcmp(name, ".note.pinfo")) {
segments++;
+ isize += (unsigned int)shdr[i].sh_size;
+ }
}
/* Now, regular headers - we only care about PT_LOAD headers,