[U-Boot] [PATCH v2] MIPS: simplify relocated _G_O_T_ address calculation

Daniel Schwierzeck daniel.schwierzeck at gmail.com
Thu Jan 31 00:50:02 CET 2013


2013/1/30 Gabor Juhos <juhosg at openwrt.org>:
> The difference between the address of the original
> and the relocated _GLOBAL_OFFSET_TABLE_ is always
> the same as the relocation offset.
>
> The relocation offset is already computed and it is
> available in the 's1/t6' register. Use that to adjust
> the relocated _G_O_T_ address, instead of calculating
> the offset again from the _gp value.
>
> Signed-off-by: Gabor Juhos <juhosg at openwrt.org>
> Cc: Daniel Schwierzeck <daniel.schwierzeck at googlemail.com>
> Cc: Xiangfu Liu <xiangfu at openmobilefree.net>
> ---
> Changes since v1: modify Xburst code as well
>
> This depends on the:
>
> 'MIPS: xburst: simplify relocation offset calculation' patch
> http://patchwork.ozlabs.org/patch/216934/
>
> and supersedes this one:
> http://patchwork.ozlabs.org/patch/214350/
> ---
>  arch/mips/cpu/mips32/start.S |    5 +----
>  arch/mips/cpu/mips64/start.S |    5 +----
>  arch/mips/cpu/xburst/start.S |    5 +----
>  3 files changed, 3 insertions(+), 12 deletions(-)

applied to u-boot-mips/master, thanks

-- 
Best regards,
Daniel


More information about the U-Boot mailing list