From: Bin Meng <bmeng.cn@gmail.com> To: Ben Dooks <ben.dooks@codethink.co.uk> Cc: linux-kernel@lists.codethink.co.uk, linux-kernel <linux-kernel@vger.kernel.org>, linux-riscv <linux-riscv@lists.infradead.org>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu> Subject: Re: [PATCH] riscv: add correct as-options for assembly in modules Date: Fri, 16 Jul 2021 18:44:14 +0800 [thread overview] Message-ID: <CAEUhbmWmrEuwdy8OPhF1p1Sb7779QiWkx-Ca1OG5VQ38dxChLw@mail.gmail.com> (raw) In-Reply-To: <20210712174849.2202287-1-ben.dooks@codethink.co.uk> On Tue, Jul 13, 2021 at 2:28 AM Ben Dooks <ben.dooks@codethink.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 FYI The GCC bug was fixed recently via: https://github.com/gcc-mirror/gcc/commit/3b0a7d624e64eeb81e4d5e8c62c46d86ef521857 > > 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@codethink.co.uk> > --- > arch/riscv/Makefile | 1 + > 1 file changed, 1 insertion(+) > Otherwise, Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
WARNING: multiple messages have this Message-ID (diff)
From: Bin Meng <bmeng.cn@gmail.com> To: Ben Dooks <ben.dooks@codethink.co.uk> Cc: linux-kernel@lists.codethink.co.uk, linux-kernel <linux-kernel@vger.kernel.org>, linux-riscv <linux-riscv@lists.infradead.org>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu> Subject: Re: [PATCH] riscv: add correct as-options for assembly in modules Date: Fri, 16 Jul 2021 18:44:14 +0800 [thread overview] Message-ID: <CAEUhbmWmrEuwdy8OPhF1p1Sb7779QiWkx-Ca1OG5VQ38dxChLw@mail.gmail.com> (raw) In-Reply-To: <20210712174849.2202287-1-ben.dooks@codethink.co.uk> On Tue, Jul 13, 2021 at 2:28 AM Ben Dooks <ben.dooks@codethink.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 FYI The GCC bug was fixed recently via: https://github.com/gcc-mirror/gcc/commit/3b0a7d624e64eeb81e4d5e8c62c46d86ef521857 > > 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@codethink.co.uk> > --- > arch/riscv/Makefile | 1 + > 1 file changed, 1 insertion(+) > Otherwise, Reviewed-by: Bin Meng <bmeng.cn@gmail.com> _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2021-07-16 10:44 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-07-12 17:48 [PATCH] riscv: add correct as-options for assembly in modules Ben Dooks 2021-07-12 17:48 ` Ben Dooks 2021-07-16 10:23 ` Ben Dooks 2021-07-16 10:23 ` Ben Dooks 2021-07-16 10:44 ` Bin Meng [this message] 2021-07-16 10:44 ` Bin Meng 2021-07-16 15:33 ` Ben Dooks 2021-07-16 15:33 ` Ben Dooks 2021-07-16 22:37 ` Bin Meng 2021-07-16 22:37 ` Bin Meng 2021-12-08 19:26 Ben Dooks 2021-12-08 19:26 ` Ben Dooks 2022-01-10 15:51 ` Ben Dooks 2022-01-10 15:51 ` Ben Dooks 2022-01-11 7:41 ` Bin Meng 2022-01-11 7:41 ` Bin Meng 2022-05-29 15:19 Ben Dooks 2022-05-29 15:19 ` Ben Dooks 2022-05-29 15:23 ` Ben Dooks 2022-05-29 15:23 ` Ben Dooks
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=CAEUhbmWmrEuwdy8OPhF1p1Sb7779QiWkx-Ca1OG5VQ38dxChLw@mail.gmail.com \ --to=bmeng.cn@gmail.com \ --cc=aou@eecs.berkeley.edu \ --cc=ben.dooks@codethink.co.uk \ --cc=linux-kernel@lists.codethink.co.uk \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-riscv@lists.infradead.org \ --cc=palmer@dabbelt.com \ --cc=paul.walmsley@sifive.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.