print_decomp_msg() names the image it is about to unpack, which drags uimage_type[] and its strings into any phase that links image_decomp(). That is about 2.5KB, measured on a Rockchip RK3576 SPL, spent on one line of progress output in a phase built for size.
Name it "image" there instead. U-Boot proper is unchanged. Reviewed-by: Tom Rini <[email protected]> Signed-off-by: Alexey Charkov <[email protected]> --- boot/image.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/boot/image.c b/boot/image.c index 185d52ba492f..a7dc69e858ad 100644 --- a/boot/image.c +++ b/boot/image.c @@ -416,7 +416,12 @@ void image_print_contents(const void *ptr) static void print_decomp_msg(int comp_type, int type, bool is_xip, ulong load) { - const char *name = genimg_get_type_name(type); + /* + * The image-type table and its strings cost about 2.5KB, which is a + * lot to spend on a progress message in a phase built for size. + */ + const char *name = IS_ENABLED(CONFIG_XPL_BUILD) ? "image" : + genimg_get_type_name(type); /* Shows "Loading Kernel Image" for example */ if (comp_type == IH_COMP_NONE) -- 2.55.0
