From: Ben Dooks <ben.dooks@codethink.co.uk>
To: linux-kernel@lists.codethink.co.uk, linux-kernel@vger.kernel.org,
linux-riscv@lists.infradead.org
Cc: paul.walmsley@sifive.com, palmer@dabbelt.com,
aou@eecs.berkeley.edu, Bin Meng <bmeng.cn@gmail.com>
Subject: Re: [PATCH] [PATCH v2] riscv: add as-options for modules with assembly compontents
Date: Tue, 10 Aug 2021 09:49:14 +0100 [thread overview]
Message-ID: <8b110ad1-b5de-40ba-4131-faee1f9bde26@codethink.co.uk> (raw)
In-Reply-To: <20210720144458.367954-1-ben.dooks@codethink.co.uk>
On 20/07/2021 15:44, Ben Dooks wrote:
> When trying to load modules built for RISC-V which include assembly files
> the kernel loader errors with "unexpected relocation type 'R_RISCV_ALIGN'"
> due to R_RISCV_ALIGN relocations being generated by the assembler.
>
> The R_RISCV_ALIGN relocations can be removed at the expense of code space
> by adding -mno-relax to gcc and as. In commit 7a8e7da42250138
> ("RISC-V: Fixes to module loading") -mno-relax is added to the build
> variable KBUILD_CFLAGS_MODULE. See [1] for more info.
>
> The issue is that when kbuild builds a .S file, it invokes gcc with
> the -mno-relax flag, but this is not being passed through to the
> assembler. Adding -Wa,-mno-relax to KBUILD_AFLAGS_MODULE ensures that
> the assembler is invoked correctly. This may have now been fixed in
> gcc[2] and this addition should not stop newer gcc and as from working.
>
> [1] https://github.com/riscv/riscv-elf-psabi-doc/issues/183
> [2] https://github.com/gcc-mirror/gcc/commit/3b0a7d624e64eeb81e4d5e8c62c46d86ef521857
Just wanted to check v2 is fine for merging, and if so when is that
likely to be?
--
Ben Dooks http://www.codethink.co.uk/
Senior Engineer Codethink - Providing Genius
https://www.codethink.co.uk/privacy.html
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2021-08-10 8:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-20 14:44 [PATCH] [PATCH v2] riscv: add as-options for modules with assembly compontents Ben Dooks
2021-08-10 8:49 ` Ben Dooks [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-05-29 15:22 Ben Dooks
2022-07-21 19:53 ` Palmer Dabbelt
2022-07-25 11:38 ` Ben Dooks
2022-07-25 11:42 ` Conor.Dooley
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=8b110ad1-b5de-40ba-4131-faee1f9bde26@codethink.co.uk \
--to=ben.dooks@codethink.co.uk \
--cc=aou@eecs.berkeley.edu \
--cc=bmeng.cn@gmail.com \
--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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox