summaryrefslogtreecommitdiff
path: root/tools/binman/elf_test.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-01-07 07:35:15 +0300
committerSimon Glass <sjg@chromium.org>2021-01-31 00:25:41 +0300
commit870a9ead569ce8ee1f9fc03d178b56e012465582 (patch)
tree68b18615bdfce0c7c573401b90ed481b33f259bc /tools/binman/elf_test.py
parent1ecf3b8f274f2fc66317d73532c82639f661f3ef (diff)
downloadu-boot-870a9ead569ce8ee1f9fc03d178b56e012465582.tar.xz
binman: Support finding symbols in sub-sections
At present binman only supports resolving symbols in the same section as the binary that uses it. This is quite limited because we often need to group entries into different sections. Enhance the algorithm to search the entire image for symbols. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/elf_test.py')
-rw-r--r--tools/binman/elf_test.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/binman/elf_test.py b/tools/binman/elf_test.py
index e3d218a89e..7a128018d9 100644
--- a/tools/binman/elf_test.py
+++ b/tools/binman/elf_test.py
@@ -45,10 +45,12 @@ class FakeSection:
def GetPath(self):
return 'section_path'
- def LookupSymbol(self, name, weak, msg, base_addr):
+ def LookupImageSymbol(self, name, weak, msg, base_addr):
"""Fake implementation which returns the same value for all symbols"""
return self.sym_value
+ def GetImage(self):
+ return self
def BuildElfTestFiles(target_dir):
"""Build ELF files used for testing in binman