summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/cbfstool/Makefile2
-rw-r--r--util/cbfstool/cbfs-mkpayload.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/util/cbfstool/Makefile b/util/cbfstool/Makefile
index 94712bdd6d..d74c44ee5d 100644
--- a/util/cbfstool/Makefile
+++ b/util/cbfstool/Makefile
@@ -2,6 +2,8 @@ obj ?= $(shell pwd)
HOSTCXX ?= g++
HOSTCC ?= gcc
+CFLAGS ?= -g
+
BINARY:=$(obj)/cbfstool
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,