lkml.org 
[lkml]   [2020]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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.

\
 
 \ /
  Last update: 2020-05-25 21:23    [W:0.099 / U:5.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site