From: Will Deacon <will@kernel.org>
To: Fangrui Song <maskray@google.com>
Cc: Masahiro Yamada <masahiroy@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
Peter Collingbourne <pcc@google.com>
Subject: Re: [PATCH v3] Makefile: use -z pack-relative-relocs
Date: Thu, 13 Apr 2023 15:55:09 +0100 [thread overview]
Message-ID: <20230413145508.GC26421@willie-the-truck> (raw)
In-Reply-To: <20230411200944.2591330-1-maskray@google.com>
On Tue, Apr 11, 2023 at 08:09:44PM +0000, Fangrui Song wrote:
> Commit 27f2a4db76e8 ("Makefile: fix GDB warning with CONFIG_RELR")
> added --use-android-relr-tags to fix a GDB warning
>
> BFD: /android0/linux-next/vmlinux: unknown type [0x13] section `.relr.dyn'
>
> The GDB warning has been fixed in version 11.2.
>
> The DT_ANDROID_RELR tag was deprecated since DT_RELR was standardized.
> Thus, --use-android-relr-tags should be removed. While making the
> change, try -z pack-relative-relocs, which is supported since LLD 15.
> Keep supporting --pack-dyn-relocs=relr as well for older LLD versions.
> There is no indication of obsolescence for --pack-dyn-relocs=relr.
>
> As of today, GNU ld supports the latter option for x86 and powerpc64
> ports and has no intention to support --pack-dyn-relocs=relr. In the
> absence of the glibc symbol version GLIBC_ABI_DT_RELR,
> --pack-dyn-relocs=relr and -z pack-relative-relocs are identical in
> ld.lld.
>
> GNU ld and newer versions of LLD report warnings (instead of errors) for
> unknown -z options. Only errors lead to non-zero exit codes. Therefore,
> we should test --pack-dyn-relocs=relr before testing
> -z pack-relative-relocs.
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/1057
> Link: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=a619b58721f0a03fd91c27670d3e4c2fb0d88f1e
> Signed-off-by: Fangrui Song <maskray@google.com>
> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
> ---
> Makefile | 3 ++-
> scripts/tools-support-relr.sh | 8 ++++++--
> 2 files changed, 8 insertions(+), 3 deletions(-)
Acked-by: Will Deacon <will@kernel.org>
Masahiro -- are you happy to pick this one up? If not, I can take it via
arm64 (as the only arch currently using this reloc format).
Cheers,
Will
next prev parent reply other threads:[~2023-04-13 14:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-11 20:09 Fangrui Song
2023-04-13 14:55 ` Will Deacon [this message]
2023-04-13 17:53 ` Masahiro Yamada
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=20230413145508.GC26421@willie-the-truck \
--to=will@kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=maskray@google.com \
--cc=ndesaulniers@google.com \
--cc=pcc@google.com \
/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
all inboxes | Powered by JetHome®