summaryrefslogtreecommitdiff
path: root/tools/binman/entry.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-10-20 18:22:47 -0600
committerTom Rini <trini@konsulko.com>2022-10-31 11:02:44 -0400
commitd2afb9edce0089f06d8f353cf88d8f5dec984914 (patch)
tree6e97d230ea5b70e980955fd362030fd6a958d5d1 /tools/binman/entry.py
parent3fbba5568ca9ccd59a6bc824dc2dd9e6eac2b504 (diff)
binman: Support writing symbols into ELF files
In some cases the ELF version of SPL builds may be packaged, rather than a binary .bin file. Add support for this. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/entry.py')
-rw-r--r--tools/binman/entry.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/binman/entry.py b/tools/binman/entry.py
index bdf53ddd922..1be31a05e00 100644
--- a/tools/binman/entry.py
+++ b/tools/binman/entry.py
@@ -656,7 +656,10 @@ class Entry(object):
section: Section containing the entry
"""
if self.auto_write_symbols:
- elf.LookupAndWriteSymbols(self.elf_fname, self, section.GetImage())
+ # Check if we are writing symbols into an ELF file
+ is_elf = self.GetDefaultFilename() == self.elf_fname
+ elf.LookupAndWriteSymbols(self.elf_fname, self, section.GetImage(),
+ is_elf)
def CheckEntries(self):
"""Check that the entry offsets are correct