[PATCH] Makefile: apply dynamic relocations for LLD
Tom Rini
trini at konsulko.com
Tue Oct 11 15:56:41 CEST 2022
On Mon, Sep 26, 2022 at 08:47:40PM +0000, Alistair Delva wrote:
> From: Nick Desaulniers <ndesaulniers at google.com>
>
> It seems that for aarch64, unless we apply dynamic relocations to the
> location being relocated, we fail to boot.
>
> As Fangrui notes:
> For dynamic relocations using the RELA format (readelf -Wr), GNU ld
> sets the initial content to r_addend; ld.lld doesn't do that by
> default (needs --apply-dynamic-relocs).
>
> Otherwise .rodata appears to be full of NUL-bytes before relocation,
> causing crashes when trying to invoke the function pointers in
> init_sequence_f from initcall_run_list().
>
> Link: https://reviews.llvm.org/D42797
> Suggested-by: Fangrui Song <maskray at google.com>
> Signed-off-by: Nick Desaulniers <ndesaulniers at google.com>
> Signed-off-by: Alistair Delva <adelva at google.com>
> Cc: Simon Glass <sjg at chromium.org>
> Cc: Tom Rini <trini at konsulko.com>
> Cc: Nick Desaulniers <ndesaulniers at google.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20221011/8702b1b6/attachment.sig>
More information about the U-Boot
mailing list