[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAEUhbmX6gh9KzLLWquJ9PKFiOg+Vehv_DZL27WpSEVTE-L_wRw@mail.gmail.com>
Date: Tue, 11 Jan 2022 15:41:38 +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>,
Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>
Subject: Re: [PATCH] riscv: add correct as-options for assembly in modules
On Thu, Dec 9, 2021 at 3:26 AM Ben Dooks <ben.dooks@...ethink.co.uk> wrote:
>
> When trying to load modules built for riscv which include assembly
> 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
> CFLAGS have -mno-relax added. This however does not get applied to
> KBUILD_AFLAGS_MODULE so when a module builds a .S file, the -mno-relax
> is not passed and the above error is seen. Fix it by adding the flags
> '-Wa,-mno-relax' to KBUILD_AFLAGS_MODULE.
>
> This may have been fixed in gcc, in:
> https://github.com/gcc-mirror/gcc/commit/3b0a7d624e64eeb81e4d5e8c62c46d86ef521857
>
> Signed-off-by: Ben Dooks <ben.dooks@...ethink.co.uk>
> --
> Changes since v1:
> - added Bin Meng's review of the original patch
Looks like you forgot to include the RB tag? :)
Reviewed-by: Bin Meng <bmeng.cn@...il.com>
> ---
> arch/riscv/Makefile | 1 +
> 1 file changed, 1 insertion(+)
>
Regards,
Bin
Powered by blists - more mailing lists