summaryrefslogtreecommitdiff
path: root/tools/binman/entry.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2024-08-26 13:11:41 -0600
committerSimon Glass <sjg@chromium.org>2024-09-26 12:40:30 +0200
commitb73d0bb584e5f89c8d80c7435f1a6c036be25dd9 (patch)
treee86a2fb2b27fa5896f82aabc87f5fa54ef0d23ae /tools/binman/entry.py
parentbce055338eabdac46d34c781753e05486898325a (diff)
binman: Unwind the end-at-4gb special-case a little
Move the check for this further out, so that base_addr is computed in Entry.WriteSymbols() rather than at lower levels. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/entry.py')
-rw-r--r--tools/binman/entry.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/binman/entry.py b/tools/binman/entry.py
index 8ad9fe89e0c..68f8d62bba9 100644
--- a/tools/binman/entry.py
+++ b/tools/binman/entry.py
@@ -711,15 +711,22 @@ class Entry(object):
def WriteSymbols(self, section):
"""Write symbol values into binary files for access at run time
+ As a special case, if symbols_base is not specified and this is an
+ end-at-4gb image, a symbols_base of 0 is used
+
Args:
section: Section containing the entry
"""
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
+
+ symbols_base = self.symbols_base
+ if symbols_base is None and self.GetImage()._end_4gb:
+ symbols_base = 0
+
elf.LookupAndWriteSymbols(self.elf_fname, self, section.GetImage(),
- is_elf, self.elf_base_sym,
- self.symbols_base)
+ is_elf, self.elf_base_sym, symbols_base)
def CheckEntries(self):
"""Check that the entry offsets are correct