1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-10-06 18:54:57 +02:00

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

@@ -371,6 +371,11 @@ class TestElf(unittest.TestCase):
elf.GetSymbolOffset(fname, 'embed')
self.assertIn('__image_copy_start', str(e.exception))
def test_get_symbol_address(self):
fname = self.ElfTestFile('embed_data')
addr = elf.GetSymbolAddress(fname, 'region_size')
self.assertEqual(0, addr)
if __name__ == '__main__':
unittest.main()