1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-03 01:32:47 +02:00

binman: Add a function to read ELF symbols

In some cases we need to read symbols from U-Boot. At present we have a
a few cases which does this via 'nm' and 'grep'.

It is better to use objdump since that tells us the size of the symbols
and also whether it is weak or not.

Add a new module which reads ELF information from files. Update existing
uses of 'nm' to use this module.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2017-11-13 18:54:54 -07:00
parent cf71338ee7
commit b50e5611a6
8 changed files with 128 additions and 11 deletions

View File

@@ -33,6 +33,7 @@ import control
def RunTests():
"""Run the functional tests and any embedded doctests"""
import elf_test
import entry_test
import fdt_test
import ftest
@@ -50,7 +51,7 @@ def RunTests():
# 'entry' module.
suite = unittest.TestLoader().loadTestsFromTestCase(entry_test.TestEntry)
suite.run(result)
for module in (ftest.TestFunctional, fdt_test.TestFdt):
for module in (ftest.TestFunctional, fdt_test.TestFdt, elf_test.TestElf):
suite = unittest.TestLoader().loadTestsFromTestCase(module)
suite.run(result)