binman: Allow disabling symbol writing

Some boards don't use symbol writing but do access the symbols in SPL.
Provide an option to work around this.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass 2023-07-18 07:23:54 -06:00
parent f5ae32d794
commit 4649beae3e
5 changed files with 64 additions and 5 deletions

View file

@ -158,6 +158,7 @@ class Entry(object):
self.offset_from_elf = None
self.preserve = False
self.build_done = False
self.no_write_symbols = False
@staticmethod
def FindEntryClass(etype, expanded):
@ -321,6 +322,7 @@ class Entry(object):
'offset-from-elf')
self.preserve = fdt_util.GetBool(self._node, 'preserve')
self.no_write_symbols = fdt_util.GetBool(self._node, 'no-write-symbols')
def GetDefaultFilename(self):
return None
@ -695,7 +697,7 @@ class Entry(object):
Args:
section: Section containing the entry
"""
if self.auto_write_symbols:
if self.auto_write_symbols and not self.no_write_symbols:
# 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(),