From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DD47C72 for ; Tue, 28 Sep 2021 15:42:13 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id D4B4061206; Tue, 28 Sep 2021 15:42:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632843733; bh=YUTkeqO15Fma8yWD34z1Lh7SHxgvyx1Y5p/CZcT9xhU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mgQ0sRJdNp3fuetg6bKoMk21ysseY9OodqNAVvrxVtT4YvKwyDQ/p4XURIpEPS9Hh AL3PMlSNzbChQSXiG1Aw5p/5y/xxdRSK7Xv3TXi6wHAXlzvUe2nTzr9tKM2EkQzXxI N2kOlOZM1Ua3IPmx6EvGijVfUZB9OycIWURi/HlA7JI+fWJJ6OWpU69wywJhrIOgFa +Wg1EVnKLReT1qnbM2lHAQt07X0D8623UumIgdaLSZqOZTJarUkfw9iZ/2nIpWMRmu ZPIVqcq6B2UtI5+frU+0IICl6NZFVRNQv2Tckg+tWHpgkKxd3Oc4PBoCcYkgtdrApq aREcHDV9GQ7ug== From: Arnd Bergmann To: Russell King Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Arnd Bergmann , Ard Biesheuvel , Linus Walleij , Nathan Chancellor , Nick Desaulniers , llvm@lists.linux.dev, Kees Cook Subject: [PATCH 07/14] ARM: fix link warning with XIP + frame-pointer Date: Tue, 28 Sep 2021 17:41:36 +0200 Message-Id: <20210928154143.2106903-8-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210928154143.2106903-1-arnd@kernel.org> References: <20210928154143.2106903-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Arnd Bergmann When frame pointers are used instead of the ARM unwinder, and the kernel is built using clang with an external assembler and CONFIG_XIP_KERNEL, every file produces two warnings like: arm-linux-gnueabi-ld: warning: orphan section `.ARM.extab' from `net/mac802154/util.o' being placed in section `.ARM.extab' arm-linux-gnueabi-ld: warning: orphan section `.ARM.exidx' from `net/mac802154/util.o' being placed in section `.ARM.exidx' The same fix was already merged for the normal (non-XIP) linker script, with a longer description. Fixes: c39866f268f8 ("arm/build: Always handle .ARM.exidx and .ARM.extab sections") Reviewed-by: Kees Cook Signed-off-by: Arnd Bergmann --- arch/arm/kernel/vmlinux-xip.lds.S | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/kernel/vmlinux-xip.lds.S b/arch/arm/kernel/vmlinux-xip.lds.S index 50136828f5b5..e0c00986487f 100644 --- a/arch/arm/kernel/vmlinux-xip.lds.S +++ b/arch/arm/kernel/vmlinux-xip.lds.S @@ -40,6 +40,10 @@ SECTIONS ARM_DISCARD *(.alt.smp.init) *(.pv_table) +#ifndef CONFIG_ARM_UNWIND + *(.ARM.exidx) *(.ARM.exidx.*) + *(.ARM.extab) *(.ARM.extab.*) +#endif } . = XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR); -- 2.29.2