[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKwvOd=1B4Fqqwfu58mObS37N5Ocg4Hm35BwzOvbKVX4c10uKQ@mail.gmail.com>
Date: Fri, 6 Dec 2019 13:53:30 -0800
From: Nick Desaulniers <ndesaulniers@...gle.com>
To: Borislav Petkov <bp@...en8.de>, Ingo Molnar <mingo@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>, Andy <luto@...nel.org>,
Ilie Halip <ilie.halip@...il.com>,
"H. Peter Anvin" <hpa@...or.com>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
clang-built-linux <clang-built-linux@...glegroups.com>
Subject: Re: [PATCH v3] x86/boot: discard .eh_frame sections
Bumping for review (I couldn't find if this was merged already in tip/tip)
On Tue, Nov 26, 2019 at 9:16 AM Nick Desaulniers
<ndesaulniers@...gle.com> wrote:
>
> On Tue, Nov 26, 2019 at 6:46 AM Ilie Halip <ilie.halip@...il.com> wrote:
> >
> > When using GCC as compiler and LLVM's lld as linker, linking
> > setup.elf fails:
> > LD arch/x86/boot/setup.elf
> > ld.lld: error: init sections too big!
> >
> > This happens because GCC generates .eh_frame sections for most
> > of the files in that directory, then ld.lld places the merged
> > section before __end_init, triggering an assert in the linker
> > script.
> >
> > Fix this by discarding the .eh_frame sections, as suggested by
> > Boris. The kernel proper linker script discards them too.
> >
> > Signed-off-by: Ilie Halip <ilie.halip@...il.com>
> > Link: https://lore.kernel.org/lkml/20191118175223.GM6363@zn.tnic/
> > Link: https://github.com/ClangBuiltLinux/linux/issues/760
> > Suggested-by: Borislav Petkov <bp@...en8.de>
>
> Ilie, thanks for following up with a v3.
> Reviewed-by: Nick Desaulniers <ndesaulniers@...gle.com>
>
> > ---
> >
> > Changes in V3:
> > * discard .eh_frame instead of placing it after .rodata
> >
> > Changes in V2:
> > * removed wildcard for input sections (.eh_frame* -> .eh_frame)
> >
> > arch/x86/boot/setup.ld | 5 ++++-
> > 1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/x86/boot/setup.ld b/arch/x86/boot/setup.ld
> > index 0149e41d42c2..3da1c37c6dd5 100644
> > --- a/arch/x86/boot/setup.ld
> > +++ b/arch/x86/boot/setup.ld
> > @@ -51,7 +51,10 @@ SECTIONS
> > . = ALIGN(16);
> > _end = .;
> >
> > - /DISCARD/ : { *(.note*) }
> > + /DISCARD/ : {
> > + *(.eh_frame)
> > + *(.note*)
> > + }
> >
> > /*
> > * The ASSERT() sink to . is intentional, for binutils 2.14 compatibility:
> > --
> > 2.17.1
> >
>
>
> --
> Thanks,
> ~Nick Desaulniers
--
Thanks,
~Nick Desaulniers
Powered by blists - more mailing lists