[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200525192221.GA920865@rani.riverdale.lan>
Date: Mon, 25 May 2020 15:22:21 -0400
From: Arvind Sankar <nivedita@...m.mit.edu>
To: Fangrui Song <maskray@...gle.com>
Cc: Ard Biesheuvel <ardb@...nel.org>,
Arvind Sankar <nivedita@...m.mit.edu>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"H. Peter Anvin" <hpa@...or.com>, X86 ML <x86@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Dmitry Golovin <dima@...ovin.in>,
clang-built-linux <clang-built-linux@...glegroups.com>,
Masahiro Yamada <masahiroy@...nel.org>,
Daniel Kiper <daniel.kiper@...cle.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 4/4] x86/boot: Check that there are no runtime relocations
On Mon, May 25, 2020 at 09:26:26AM -0700, Fangrui Song wrote:
> On 2020-05-25, Ard Biesheuvel wrote:
> >
> >Do we really need the macro here? Could we just do
>
> The output section name does not matter: it will be discarded by the linker.
>
> >.rel.dyn : { *(.rel.* .rela.*) }
>
> If for some reasons there is at least one SHT_REL and at least one
> SHT_RELA, LLD will error "section type mismatch for .rel.dyn", while the
> intended diagnostic is the assert below.
>
> >(or even
> >
> >.rel.dyn : { *(.rel.* }
> >.rela.dyn : { *(.rela.*) }
> >
> >if the output section name matters, and always assert that both are empty)?
>
> .rel.dyn : { *(.rel.* }
> .rela.dyn : { *(.rela.*) }
>
> looks good to me.
>
>
> FWIW I intend to add -z rel and -z rela to LLD: https://reviews.llvm.org/D80496#inline-738804
> (binutils thread https://sourceware.org/pipermail/binutils/2020-May/111244.html)
>
> In case someone builds the x86-64 kernel with -z rel, your suggested
> input section description will work out of the box...
>
Ok with me.
Powered by blists - more mailing lists