Message ID | 20171130233905.130602-3-samitolvanen@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 601756064F for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 30 Nov 2017 23:40:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 519CE2A425 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 30 Nov 2017 23:40:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 465792A42A; Thu, 30 Nov 2017 23:40:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C12DE2A427 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 30 Nov 2017 23:40:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=pPLEs7l5l16hPK+DUhPfCyUNPuaaqnzIvPknYy83jaI=; b=asM6AwS8/t/GcqYxvW1RpIUiSP lyDjc0rFJPkE6ugQp9fY7vFzeHx5d86f7KDc/pil5AY8FRNBmeGCbLqbhJ1K9jaaSqDpxaEiTeWc2 84LGJwS5oAc4RmEFIwU2fArQ3x2g1Ww+o+tKcmye4LGt2wpNOkaWpQVCkFHWrGInxsb+JjZRGMLa/ URzJu8eVy0SwLvFcAEMdxLcM64lV2kJ+/MJTffMYH/IIeRAnle+sqMVTX+QN9ClZLfduXNsuISN80 WX7eXpJqtiwyJr7qSjCgx685TgHHmk3BX8/zeyKDZ0X4OjbbFtDdqPDt5DM0931u5GVcw+MhpaQMp j6XYoJAg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eKYRj-0003Io-OE; Thu, 30 Nov 2017 23:40:47 +0000 Received: from mail-it0-x243.google.com ([2607:f8b0:4001:c0b::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eKYQY-00011n-45 for linux-arm-kernel@lists.infradead.org; Thu, 30 Nov 2017 23:39:39 +0000 Received: by mail-it0-x243.google.com with SMTP id b5so514512itc.3 for <linux-arm-kernel@lists.infradead.org>; Thu, 30 Nov 2017 15:39:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=CnwkSSWhfeGzNXASeyrtpl2IK99jdD4on9+ne+YHQDg=; b=X2C3Kj445Hgs2TIxnFf0dzQnNDJbXNMWYFw8Mz4kw1NHhmCHQh9efktR2nRueYgWnH P5PXjRDbCt2HG3NkPQ5qHEFiXYVhchqr8bBaH95Ic7eezz1lSg5KzGHSVqwOePluNzG0 ztQuLsgunJi4sGA9eUJgbt5VzGuZ+mtC+34kyIuJuY6BDwuGUAxniU0i8FXsEh2eYY83 nIn+PmDmtSVkq48E7TNbC6+BziRJ561Csx/DRiIAbpWBrSnnMG83/Fsg3OsN8UP47a2Z CEzdf4qz8ZCB56JHQcnMBrMQtnMkn+fNFofV2azkBIMNSOLnpp4JmVOoSRss24uMw8sm mfSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=CnwkSSWhfeGzNXASeyrtpl2IK99jdD4on9+ne+YHQDg=; b=PdWGRlIrZvIrt4ZBShFYyrtMTCYOVG0u/vCSeX7GHFh7XPI0hzNBAwYQpsvRGGpT6+ NKCkHbfZ4Mp6lE6Zm8eI9Xf38hG/30kywhREpfubavDNZ9SGPTpKS2Oznv1ppkyaltDQ VYB2/B1FBVGaCdlJWH8xQvWNBHI+h7oNqpgDMf6QEYcvCR/4DN+0nwkPl5W3PA9YbBUN uvHmP34ke99MDv8pO68FZje+WgpqYIpzlbJH8FpOt66Jf+0mB9aQXsTxDVNw9fPdcxjc vwwq1sC0iE/DYVQhXUyijv1GqH77OPbABA0cJeAvwxREvYbMF5pXZdBFSbzVINdAeRa0 yUDQ== X-Gm-Message-State: AJaThX6lqehci2DFJT8OZe2t2xkOCKVzjqvqUlcA8hlG0Z8bg+L5JaBZ CBROMIV8BH2YifBS+5GqM5f76A== X-Google-Smtp-Source: AGs4zMaXWd4c2ASmIXF7if1R0phX1uHuXPU+Y13xxBroyZXb4IS+d1k6beHK0byOG4ftYiLbaaTChQ== X-Received: by 10.36.61.79 with SMTP id n76mr6063773itn.143.1512085152543; Thu, 30 Nov 2017 15:39:12 -0800 (PST) Received: from samitolvanen.mtv.corp.google.com ([100.98.112.14]) by smtp.gmail.com with ESMTPSA id h73sm2896676itb.21.2017.11.30.15.39.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 30 Nov 2017 15:39:11 -0800 (PST) From: Sami Tolvanen <samitolvanen@google.com> To: Alex Matveev <alxmtvv@gmail.com>, Andi Kleen <ak@linux.intel.com>, Ard Biesheuvel <ard.biesheuvel@linaro.org>, Greg Hackmann <ghackmann@google.com>, Kees Cook <keescook@chromium.org>, linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Rutland <mark.rutland@arm.com>, Masahiro Yamada <yamada.masahiro@socionext.com>, Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>, Michal Marek <michal.lkml@markovi.net>, Nick Desaulniers <ndesaulniers@google.com>, Yury Norov <ynorov@caviumnetworks.com>, Matthias Kaehlcke <mka@chromium.org>, Nicholas Piggin <npiggin@gmail.com> Subject: [PATCH v2 2/7] arm64: keep .altinstructions and .altinstr_replacement Date: Thu, 30 Nov 2017 15:39:00 -0800 Message-Id: <20171130233905.130602-3-samitolvanen@google.com> X-Mailer: git-send-email 2.15.0.531.g2ccb3012c9-goog In-Reply-To: <20171130233905.130602-1-samitolvanen@google.com> References: <20171129234442.655-1-samitolvanen@google.com> <20171130233905.130602-1-samitolvanen@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171130_153934_848367_3A4266A8 X-CRM114-Status: UNSURE ( 9.73 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Sami Tolvanen <samitolvanen@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S index 7da3e5c366a0..15479995869c 100644 --- a/arch/arm64/kernel/vmlinux.lds.S +++ b/arch/arm64/kernel/vmlinux.lds.S @@ -138,11 +138,11 @@ SECTIONS . = ALIGN(4); .altinstructions : { __alt_instructions = .; - *(.altinstructions) + KEEP(*(.altinstructions)) __alt_instructions_end = .; } .altinstr_replacement : { - *(.altinstr_replacement) + KEEP(*(.altinstr_replacement)) } . = ALIGN(PAGE_SIZE);
Make sure the linker doesn't remove .altinstructions or .altinstr_replacement when CONFIG_LD_DEAD_CODE_DATA_ELIMINATION is enabled. Signed-off-by: Sami Tolvanen <samitolvanen@google.com> --- arch/arm64/kernel/vmlinux.lds.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)