Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3708544imu; Mon, 28 Jan 2019 09:23:54 -0800 (PST) X-Google-Smtp-Source: ALg8bN6INFIeNiCXJeaT143CYSZ01z3bHPU4k6f0prwfy7K1WKYvHZ2hZ9uKI2Qx1DWV0LAKOCCz X-Received: by 2002:a63:7044:: with SMTP id a4mr20165122pgn.359.1548696234220; Mon, 28 Jan 2019 09:23:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548696234; cv=none; d=google.com; s=arc-20160816; b=bHBtLc0KuglWyl/xv2o6Mt3yquUqMsaBLkEVdSMNwfdIu6zL+UhWjNnXhD4el3SKFb j8yyhnijNyVyq9ZE3MSSQvj/i045mZaAQlLRx+BOhOhJlSVdIWlP0za3DGEK1psoYk2b gSR5DFfzroRySFzLg3qgdbMLmHTrXl53HOarHG1eEJ5yHktUPXjjM3QGTFx5Y1GcrCCv 9+dsf5JYsMjxgyNkcf+JU8Xz6FN8k4Yalpv96WV9cwZeJ66c//KJGOjnHpPvgooYE7tw +ldEw+Kgh5PUzYXcFY4/Lwx1wq1+WgYqG8MURDopg298YrmRv/PsxHF/cyK/PtfzFwEw 2/rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7bfgHmBIkdCVjksgst+4djBLpVz2ka7PHYCEpdlzn5o=; b=Ew4JatCTU6W8XXkPbI4/1WjjpLv0M6boyFDf/mV5w692F4W1ybGsU6xWyPrvYB/p6u GHRMk0XIwSb0p/XB+pA3TOehJXI9MMyA6isDCMpvelBM3KJYqiTTeyj2dbF1ATRc5WQU juVnvkW0UriTMo2HKFiqt167X1o2LSRlJr42Hg+uQ//BIOX89TTaZ/q57fb5mKNKDZ6r fZph5ZomI0fWb67SjUnx2yuRTr+wCF70v2onqAiBmWsvCr2jyjx2ON2Rg05ITRv2dSOA C4x6Ig/XCfj63OLXwlPBW2jdMcg8jRVRBCTkRoFykHnHLs5qkNELNi5Ls+xaA4EfAHvo Vnyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UF8UKb3f; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q15si32822193pgm.420.2019.01.28.09.23.38; Mon, 28 Jan 2019 09:23:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UF8UKb3f; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731250AbfA1QCf (ORCPT + 99 others); Mon, 28 Jan 2019 11:02:35 -0500 Received: from mail.kernel.org ([198.145.29.99]:47880 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731242AbfA1QCd (ORCPT ); Mon, 28 Jan 2019 11:02:33 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 646172175B; Mon, 28 Jan 2019 16:02:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548691352; bh=NV9YqKHG/dhtUcjgFT1Az3syI48Ld/NntZKhT0dyb3g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UF8UKb3f8ZdwG3SZsOQXj3qSNwQYkn032Rv93o6a7cXMidCKTcDmTK5HxYTAVg7H9 0E6klOumkBpk6bIe38IqiRpv9nx0AdlID8HUu2cXGOjnCYELtUe8iWKfL47qDmtFUV VnZRo690OJDXV2E277qn23beLvZveZ/UEhi93jc0= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Mathieu Malaterre , Michael Ellerman , Sasha Levin , linuxppc-dev@lists.ozlabs.org Subject: [PATCH AUTOSEL 4.19 065/258] powerpc/32: Add .data..Lubsan_data*/.data..Lubsan_type* sections explicitly Date: Mon, 28 Jan 2019 10:56:11 -0500 Message-Id: <20190128155924.51521-65-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190128155924.51521-1-sashal@kernel.org> References: <20190128155924.51521-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mathieu Malaterre [ Upstream commit beba24ac59133cb36ecd03f9af9ccb11971ee20e ] When both `CONFIG_LD_DEAD_CODE_DATA_ELIMINATION=y` and `CONFIG_UBSAN=y` are set, link step typically produce numberous warnings about orphan section: + powerpc-linux-gnu-ld -EB -m elf32ppc -Bstatic --orphan-handling=warn --build-id --gc-sections -X -o .tmp_vmlinux1 -T ./arch/powerpc/kernel/vmlinux.lds --who le-archive built-in.a --no-whole-archive --start-group lib/lib.a --end-group powerpc-linux-gnu-ld: warning: orphan section `.data..Lubsan_data393' from `init/main.o' being placed in section `.data..Lubsan_data393'. powerpc-linux-gnu-ld: warning: orphan section `.data..Lubsan_data394' from `init/main.o' being placed in section `.data..Lubsan_data394'. ... powerpc-linux-gnu-ld: warning: orphan section `.data..Lubsan_type11' from `init/main.o' being placed in section `.data..Lubsan_type11'. powerpc-linux-gnu-ld: warning: orphan section `.data..Lubsan_type12' from `init/main.o' being placed in section `.data..Lubsan_type12'. ... This commit remove those warnings produced at W=1. Link: https://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg135407.html Suggested-by: Nicholas Piggin Signed-off-by: Mathieu Malaterre Signed-off-by: Michael Ellerman Signed-off-by: Sasha Levin --- arch/powerpc/kernel/vmlinux.lds.S | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index 07ae018e550e..53016c753f3c 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel/vmlinux.lds.S @@ -296,6 +296,10 @@ SECTIONS #ifdef CONFIG_PPC32 .data : AT(ADDR(.data) - LOAD_OFFSET) { DATA_DATA +#ifdef CONFIG_UBSAN + *(.data..Lubsan_data*) + *(.data..Lubsan_type*) +#endif *(.data.rel*) *(SDATA_MAIN) *(.sdata2) -- 2.19.1