From: Tom Rini <trini@konsulko.com>
To: Alistair Delva <adelva@google.com>
Cc: u-boot@lists.denx.de, Fangrui Song <maskray@google.com>,
Nick Desaulniers <ndesaulniers@google.com>,
Simon Glass <sjg@chromium.org>
Subject: Re: [PATCH] Makefile: apply dynamic relocations for LLD
Date: Tue, 11 Oct 2022 09:56:41 -0400 [thread overview]
Message-ID: <20221011135641.GZ2020586@bill-the-cat> (raw)
In-Reply-To: <20220926204740.861969-1-adelva@google.com>
[-- Attachment #1: Type: text/plain, Size: 1025 bytes --]
On Mon, Sep 26, 2022 at 08:47:40PM +0000, Alistair Delva wrote:
> From: Nick Desaulniers <ndesaulniers@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@google.com>
> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
> Signed-off-by: Alistair Delva <adelva@google.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Tom Rini <trini@konsulko.com>
> Cc: Nick Desaulniers <ndesaulniers@google.com>
Applied to u-boot/master, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
prev parent reply other threads:[~2022-10-11 13:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-26 20:47 [PATCH] Makefile: apply dynamic relocations for LLD Alistair Delva
2022-10-11 13:56 ` Tom Rini [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221011135641.GZ2020586@bill-the-cat \
--to=trini@konsulko.com \
--cc=adelva@google.com \
--cc=maskray@google.com \
--cc=ndesaulniers@google.com \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox