From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9EAEDC433F5 for ; Sun, 29 May 2022 15:24:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1uFwqSJbVimbsE5K3hdARiMyDytpcS3aIEHZBwnnxwM=; b=AYzfh7CqNKC8f9 mpAgtIsAyb9dogGgA6m4DlJT5MXOTtqHLqWP8oGYoovnjXUPPrQyBORLybdHr/SweJMApM4e6nYb/ 2Ak20gEyECAQL67ho6WVTAI6vaC/gUws/p6EQcFuiVaJ856XGfGM6UNCVlCKqmJucSj9cGL2lC56U uUusao5fsyvn/nWo+HDiHD7XCBbc2MmZDxLb2bq3e1Dqrqc/bk0iMQeDZpFzmIxzLXfR6JAUBOxbD XQriB/aLq5/ZzqNWT1W9SLGgymQ9DWaZpgJnNJilNd8Lv4w4YVisVJ3IVa9SYytYxKorQ1OnY0t0R ojIm3UqbvrvVh4k3ZFSQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvKlj-004A5A-OB; Sun, 29 May 2022 15:23:51 +0000 Received: from imap3.hz.codethink.co.uk ([176.9.8.87]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvKlh-004A4W-Q2 for linux-riscv@lists.infradead.org; Sun, 29 May 2022 15:23:51 +0000 Received: from cpc152649-stkp13-2-0-cust121.10-2.cable.virginm.net ([86.15.83.122] helo=[192.168.0.17]) by imap3.hz.codethink.co.uk with esmtpsa (Exim 4.92 #3 (Debian)) id 1nvKle-00050E-HE; Sun, 29 May 2022 16:23:46 +0100 Message-ID: <1a624c79-c4c5-ab7c-f438-134822abfa14@codethink.co.uk> Date: Sun, 29 May 2022 16:23:45 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH] riscv: add correct as-options for assembly in modules Content-Language: en-GB To: linux-kernel@lists.codethink.co.uk, linux-riscv@lists.infradead.org Cc: palmer@dabbelt.com, aou@eecs.berkeley.edu, linux-kernel@vger.kernel.org, Bin Meng References: <20220529151920.609642-1-ben.dooks@codethink.co.uk> From: Ben Dooks Organization: Codethink Limited. In-Reply-To: <20220529151920.609642-1-ben.dooks@codethink.co.uk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220529_082349_889527_93EFD0EA X-CRM114-Status: GOOD ( 11.53 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On 29/05/2022 16:19, Ben Dooks 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 > Reviewed-by: Bin Meng Apologies, this was the wrong branch. Will resen -- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76AC3C433EF for ; Sun, 29 May 2022 15:45:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231237AbiE2PpK (ORCPT ); Sun, 29 May 2022 11:45:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231272AbiE2PpE (ORCPT ); Sun, 29 May 2022 11:45:04 -0400 X-Greylist: delayed 1272 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Sun, 29 May 2022 08:45:03 PDT Received: from imap3.hz.codethink.co.uk (imap3.hz.codethink.co.uk [176.9.8.87]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34FA469290 for ; Sun, 29 May 2022 08:45:03 -0700 (PDT) Received: from cpc152649-stkp13-2-0-cust121.10-2.cable.virginm.net ([86.15.83.122] helo=[192.168.0.17]) by imap3.hz.codethink.co.uk with esmtpsa (Exim 4.92 #3 (Debian)) id 1nvKle-00050E-HE; Sun, 29 May 2022 16:23:46 +0100 Message-ID: <1a624c79-c4c5-ab7c-f438-134822abfa14@codethink.co.uk> Date: Sun, 29 May 2022 16:23:45 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH] riscv: add correct as-options for assembly in modules Content-Language: en-GB To: linux-kernel@lists.codethink.co.uk, linux-riscv@lists.infradead.org Cc: palmer@dabbelt.com, aou@eecs.berkeley.edu, linux-kernel@vger.kernel.org, Bin Meng References: <20220529151920.609642-1-ben.dooks@codethink.co.uk> From: Ben Dooks Organization: Codethink Limited. In-Reply-To: <20220529151920.609642-1-ben.dooks@codethink.co.uk> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/05/2022 16:19, Ben Dooks 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 > Reviewed-by: Bin Meng Apologies, this was the wrong branch. Will resen -- Ben Dooks http://www.codethink.co.uk/ Senior Engineer Codethink - Providing Genius https://www.codethink.co.uk/privacy.html