]> git.sur5r.net Git - u-boot/commit
board_f: fix calculation of reloc_off
authorLothar Waßmann <LW@KARO-electronics.de>
Thu, 8 Jun 2017 08:18:25 +0000 (10:18 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 12 Jun 2017 12:38:41 +0000 (08:38 -0400)
commit53207bfd704250354c56aa74c7e96151fddee1f1
treeebe5a2d0779d30abe485a9efd16999df6adf60a2
parent69c5d76f2fd8bf645cde9f0a8225daba25d65e01
board_f: fix calculation of reloc_off

relocate_code() calculates the relocation offset wrt. the symbol
__image_copy_start which happens to have the same value as
CONFIG_TEXT_BASE on most systems.
When creating an i.MX boot image with an integrated IVT it is
convenient to have CONFIG_TEXT_BASE point to the start of the IVT
that is prepended to the actual code. Thus CONFIG_TEXT_BASE will
differ from __image_copy_start, while the calculation
'gd->relocaddr - __image_copy_start' still gives the right relocation
offset.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
common/board_f.c