Skip to content

Commit

Permalink
binman: Write symbol info before image inclusion
Browse files Browse the repository at this point in the history
At present the symbol information is written to binaries just before
binman exits. This is fine for entries within sections since the section
contents is calculated when it is needed, so the updated symbol values are
included in the image that is written.

However some binaries are inside entries which have already generated
their contents and do not notice that the entries have changed (e.g. Intel
IFWI).

Move the symbol writing earlier to cope with this.

Signed-off-by: Simon Glass <[email protected]>
  • Loading branch information
sjg20 committed Oct 15, 2019
1 parent ed9571d commit 261cbe0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/binman/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@ def ProcessImage(image, update_fdt, write_map, get_contents=True,
for dtb_item in state.GetAllFdts():
dtb_item.Sync()
dtb_item.Flush()
image.WriteSymbols()
sizes_ok = image.ProcessEntryContents()
if sizes_ok:
break
Expand All @@ -445,7 +446,6 @@ def ProcessImage(image, update_fdt, write_map, get_contents=True,
image.Raise('Entries changed size after packing (tried %s passes)' %
passes)

image.WriteSymbols()
image.BuildImage()
if write_map:
image.WriteMap()
Expand Down

0 comments on commit 261cbe0

Please sign in to comment.