[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAEUhbmVMc+rNs3ghu0pE_4+W8SzEgZ-ykeNDjriqPPZ6Zxhv+Q@mail.gmail.com>
Date: Sat, 17 Jul 2021 06:37:25 +0800
From: Bin Meng <bmeng.cn@...il.com>
To: Ben Dooks <ben.dooks@...ethink.co.uk>
Cc: linux-kernel@...ts.codethink.co.uk,
linux-kernel <linux-kernel@...r.kernel.org>,
linux-riscv <linux-riscv@...ts.infradead.org>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>
Subject: Re: [PATCH] riscv: add correct as-options for assembly in modules
On Fri, Jul 16, 2021 at 11:33 PM Ben Dooks <ben.dooks@...ethink.co.uk> wrote:
>
> On 16/07/2021 11:44, Bin Meng wrote:
> > On Tue, Jul 13, 2021 at 2:28 AM Ben Dooks <ben.dooks@...ethink.co.uk> wrote:
> >>
> >> When trying to load modules built for riscv which include assembly
> >
> > nits: RISC-V
> >
> >> the kernel loader errors with "unexpected relocation type 'R_RISCV_ALIGN'"
> >> due to R_RISCV_ALIGN relocations being generated by the assembler.
> >>
> >> In commit 7a8e7da42250138 ("RISC-V: Fixes to module loading")
> >> the fix for gcc adds -mno-relax to the command line when building
> >> C files. However this was never applied to assembly flags, and gcc
> >> does no pass -mno-relax to gas when presented with a .S file.
> >
> > does not pass
>
> I'll see if I can make this simpler. Should this get done for a v2?
>
Yes, please send v2.
> > FYI
> >
> > The GCC bug was fixed recently via:
> > https://github.com/gcc-mirror/gcc/commit/3b0a7d624e64eeb81e4d5e8c62c46d86ef521857
>
> thanks, I think it still useful to fix this in the kernel.
>
> >>
> >> The fix (other than making gcc always pass -mno-relax to gas) is
> >> to add -Wa,-mno-relax to gcc to make sure the as is invoked with
> >> the right options.
> >>
> >> Signed-off-by: Ben Dooks <ben.dooks@...ethink.co.uk>
> >> ---
> >> arch/riscv/Makefile | 1 +
> >> 1 file changed, 1 insertion(+)
> >>
> >
> > Otherwise,
> > Reviewed-by: Bin Meng <bmeng.cn@...il.com>
Regards,
Bin
Powered by blists - more mailing lists