summaryrefslogtreecommitdiff
path: root/tools/binman/elf.py
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2018-08-03 10:08:13 -0400
committerTom Rini <trini@konsulko.com>2018-08-03 10:08:13 -0400
commita30691a538b0894dfc0076150b8a3a7326b9e45a (patch)
tree2d12b0e66b9baa83199c74b5d9b392e09b529f79 /tools/binman/elf.py
parenta839c3641e4de98981695056eeeb2ec17ba1a4ab (diff)
parentcee02e6ff422fdb8b543a8097b84a9682785f46d (diff)
Merge git://git.denx.de/u-boot-dm
Diffstat (limited to 'tools/binman/elf.py')
-rw-r--r--tools/binman/elf.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/binman/elf.py b/tools/binman/elf.py
index 0ae3b611bae..97df8e32c5d 100644
--- a/tools/binman/elf.py
+++ b/tools/binman/elf.py
@@ -57,7 +57,9 @@ def GetSymbols(fname, patterns):
name = parts[2]
syms[name] = Symbol(section, int(value, 16), int(size,16),
flags[1] == 'w')
- return syms
+
+ # Sort dict by address
+ return OrderedDict(sorted(syms.iteritems(), key=lambda x: x[1].address))
def GetSymbolAddress(fname, sym_name):
"""Get a value of a symbol from an ELF file
@@ -79,9 +81,9 @@ 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
- visible at run time. This is done by finding out the symbols positions in
- the entry (using the ELF file) and replacing them with values from binman's
- data structures.
+ visible at run time. This is done by finding out the symbols offsets in the
+ entry (using the ELF file) and replacing them with values from binman's data
+ structures.
Args:
elf_fname: Filename of ELF image containing the symbol information for