X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=tools%2Fbinman%2Felf.py;h=97df8e32c5d8d60271051874c4b81a53b16914c7;hb=a3c31e98a118f78e06d87311b082e54854ff6537;hp=0ae3b611bae6bee6fa5bf160ddbf16335d5cbdb3;hpb=f55382b5e55b6922aebe45658ac72381fc205d23;p=oweals%2Fu-boot.git diff --git a/tools/binman/elf.py b/tools/binman/elf.py index 0ae3b611ba..97df8e32c5 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