[U-Boot] [PATCH 01/13] binman: Add a function to read ELF symbols

sjg at google.com sjg at google.com
Fri Dec 8 17:12:10 UTC 2017


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 at chromium.org>
---

 tools/binman/binman.py                      |  3 +-
 tools/binman/elf.py                         | 77 +++++++++++++++++++++++++++++
 tools/binman/elf_test.py                    | 32 ++++++++++++
 tools/binman/etype/u_boot_spl_bss_pad.py    |  7 +--
 tools/binman/etype/u_boot_with_ucode_ptr.py |  9 ++--
 tools/binman/ftest.py                       |  7 +++
 tools/binman/test/bss_data.c                |  2 +-
 tools/binman/test/u_boot_ucode_ptr.c        |  2 +-
 8 files changed, 128 insertions(+), 11 deletions(-)
 create mode 100644 tools/binman/elf.py
 create mode 100644 tools/binman/elf_test.py

Applied to u-boot-dm thanks!


More information about the U-Boot mailing list