summaryrefslogtreecommitdiff
path: root/tools/binman/elf.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2018-06-01 09:38:13 -0600
committerSimon Glass <sjg@chromium.org>2018-06-07 11:25:07 -0800
commitf55382b5e55b6922aebe45658ac72381fc205d23 (patch)
treea06d2f15d32fa4d0eeed77274cf1b729e5832e34 /tools/binman/elf.py
parent8f1da50ccca246fe2c3e9d8ef890b48e7bc8795b (diff)
binman: Rename ELF parameters to 'section'
We now pass a Section object to these functions rather than an Image. Rename the parameters to avoid confusion. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/elf.py')
-rw-r--r--tools/binman/elf.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/binman/elf.py b/tools/binman/elf.py
index 50085a3893..0ae3b611ba 100644
--- a/tools/binman/elf.py
+++ b/tools/binman/elf.py
@@ -75,7 +75,7 @@ def GetSymbolAddress(fname, sym_name):
return None
return sym.address
-def LookupAndWriteSymbols(elf_fname, entry, image):
+def LookupAndWriteSymbols(elf_fname, entry, section):
"""Replace all symbols in an entry with their correct values
The entry contents is updated so that values for referenced symbols will be
@@ -87,7 +87,7 @@ def LookupAndWriteSymbols(elf_fname, entry, image):
elf_fname: Filename of ELF image containing the symbol information for
entry
entry: Entry to process
- image: Image which can be used to lookup symbol values
+ section: Section which can be used to lookup symbol values
"""
fname = tools.GetInputFilename(elf_fname)
syms = GetSymbols(fname, ['image', 'binman'])
@@ -98,8 +98,8 @@ def LookupAndWriteSymbols(elf_fname, entry, image):
return
for name, sym in syms.iteritems():
if name.startswith('_binman'):
- msg = ("Image '%s': Symbol '%s'\n in entry '%s'" %
- (image.GetPath(), name, entry.GetPath()))
+ msg = ("Section '%s': Symbol '%s'\n in entry '%s'" %
+ (section.GetPath(), name, entry.GetPath()))
offset = sym.address - base.address
if offset < 0 or offset + sym.size > entry.contents_size:
raise ValueError('%s has offset %x (size %x) but the contents '
@@ -114,7 +114,7 @@ def LookupAndWriteSymbols(elf_fname, entry, image):
(msg, sym.size))
# Look up the symbol in our entry tables.
- value = image.LookupSymbol(name, sym.weak, msg)
+ value = section.LookupSymbol(name, sym.weak, msg)
if value is not None:
value += base.address
else: