binman: Correct handling of zero bss size

Fix the check for the __bss_size symbol, since it may be 0. Unfortunately
there was no test coverage for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2023-07-18 07:24:01 -06:00
parent 073fc36c17
commit e1ad57e7ef
10 changed files with 69 additions and 4 deletions

View File

@@ -0,0 +1,16 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2016 Google, Inc
*
* Simple program to create a bss_data region so the symbol can be read
* by binutils. This is used by binman tests.
*/
int bss_data[10];
int main(void)
{
bss_data[2] = 2;
return 0;
}