[PATCH 2/2] arch: m68k: Implement relocation

Simon Glass sjg at chromium.org
Mon Jul 31 19:08:08 CEST 2023


On Sun, 30 Jul 2023 at 16:21, Marek Vasut
<marek.vasut+renesas at mailbox.org> wrote:
>
> Implement relocation for M68K. Perform all the updates in start.S
> relocate_code in assemby, since it is a simple matter of traversing
> the dynsym table and adding relocation offset - MONITOR_BASE to all
> the items in that table. The necessity to deal with MONITOR_BASE is
> a specific of M68K, where the ELF entry point is at offset 0x400,
> which is the MONITOR_BASE, while TEXT_BASE is at offset 0 .
>
> This also removes the one last user of NEEDS_MANUAL_RELOC, so that
> could be finally cleaned up .
>
> Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
> ---
> Cc: Angelo Dureghello <angelo at kernel-space.org>
> Cc: Angelo Durgehello <angelo.dureghello at timesys.com>
> Cc: Bin Meng <bmeng.cn at gmail.com>
> Cc: Heinrich Schuchardt <xypron.glpk at gmx.de>
> Cc: Huan Wang <alison.wang at nxp.com>
> Cc: Marek Vasut <marek.vasut+renesas at mailbox.org>
> Cc: Michal Simek <michal.simek at amd.com>
> Cc: Ovidiu Panait <ovpanait at gmail.com>
> Cc: Simon Glass <sjg at chromium.org>
> Cc: Zong Li <zong.li at sifive.com>
> ---
>  arch/Kconfig                   |  1 -
>  arch/m68k/Kconfig              |  4 +--
>  arch/m68k/config.mk            |  6 ++--
>  arch/m68k/cpu/mcf523x/start.S  | 57 ++++++++++++++++++++------------
>  arch/m68k/cpu/mcf52x2/start.S  | 57 ++++++++++++++++++++------------
>  arch/m68k/cpu/mcf530x/start.S  | 59 +++++++++++++++++++++-------------
>  arch/m68k/cpu/mcf532x/start.S  | 57 ++++++++++++++++++++------------
>  arch/m68k/cpu/mcf5445x/start.S | 57 ++++++++++++++++++++------------
>  arch/m68k/cpu/u-boot.lds       | 14 ++++++++
>  9 files changed, 204 insertions(+), 108 deletions(-)

yay!

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list