From patchwork Sat Nov 26 03:20:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 699458 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tQdXY1QWFz9vF9 for ; Sat, 26 Nov 2016 14:22:05 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="S7oWphDo"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3tQdXY0JxgzDw1X for ; Sat, 26 Nov 2016 14:22:05 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="S7oWphDo"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3tQdW16LvPzDvsS for ; Sat, 26 Nov 2016 14:20:45 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="S7oWphDo"; dkim-atps=neutral Received: by mail-pf0-x244.google.com with SMTP id 144so3601815pfv.0 for ; Fri, 25 Nov 2016 19:20:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=oFiLsif1Hu49vNUQMsNy+a5wK4OxC+773yDDg08PEaU=; b=S7oWphDoUZIv4XAus9XwTaBzB62n0NnvJaiHogVE4XOPKlSb/yoDo1SMSnMcfGA3s+ AIp0Q1wjPXDj1ohW1/EnOUaXtoOYSuGIf2J23txq5xPKfF2cwxbGn7/OOxEMGahC0sc4 k+onHPk6eEfXEwlgqLPFd6zKpRYPA/Q6apQJpbIZK5abZdZRriuJFJyWPn4UtgT0ZiWS jsHTy1+8yuzGJdnKokolHpR7aubsbRVRq5+Uq/tYYc3S2LwqbuGwCm180rAhtZVcOCg5 FC0ZLmBsCDHpF+O0VJ16RjxT/Dy5xXqxFNoY2NFivfVAdbXvEkwGcANcdYax8zvjhUxL c3Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=oFiLsif1Hu49vNUQMsNy+a5wK4OxC+773yDDg08PEaU=; b=SV53wKG84srq0bMK7AUPdRVp6oFElGyXSxtUBbWjWs8Gh/bKb/xSvDokIhAEnEteuP 7ARVWzf0xZX4wejaCFJjnzF+Q5SaMaldTObAG53lJl6AEO4M57LvbtscmX/5hCmx5WHw AZoGF+TfzJuUQrBPygIVACKHw9L5gEtpPSfR7tgOT2Tzy5yvZJimdZ361Z1QUWSf2p/6 eg7fuxlkIidZttWsLeP6Q4LBx981dY7nxPowU+g9PqiPFxmmZPlw57+rKpGQynuGjNiG 3ouMae79eWilun+vTs7S1nbucAXVA1WDmzVmIFg4zOoq6MNp/bwqMXsAlzX6gt+vAh4l RBcw== X-Gm-Message-State: AKaTC02TJK+GxvcFvca38bsWt1CsSa9VmHmZGXGq7jVeZCxouMkSp8ys0XZW7e3y/w3/Vw== X-Received: by 10.99.99.195 with SMTP id x186mr20432301pgb.100.1480130443213; Fri, 25 Nov 2016 19:20:43 -0800 (PST) Received: from roar.local0.net (27-33-21-189.tpgi.com.au. [27.33.21.189]) by smtp.gmail.com with ESMTPSA id 1sm43145176pgp.1.2016.11.25.19.20.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Nov 2016 19:20:42 -0800 (PST) From: Nicholas Piggin To: Michael Ellerman Subject: [PATCH] powerpc/64: place .text immediately following .head.text Date: Sat, 26 Nov 2016 14:20:31 +1100 Message-Id: <20161126032031.12765-1-npiggin@gmail.com> X-Mailer: git-send-email 2.10.2 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linuxppc-dev@lists.ozlabs.org, Nicholas Piggin Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Do not introduce any additional alignment. Placement of text section will be set by fixed section macros. Without this, output section alignment defaults to 4096, which makes BookE text section start at 0x1000 when it is expected to start at 0x100. This was introduced by 57f266497d81 ("powerpc: Use gas sections for arranging exception vectors") and was caught with the scripted head section checker (not yet merged). Fixes: 57f266497d81 Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/vmlinux.lds.S | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index 8295f51..7394b77 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel/vmlinux.lds.S @@ -94,8 +94,17 @@ SECTIONS * detected, and will result in a crash at boot due to offsets being * wrong. */ +#ifdef CONFIG_PPC64 + /* + * BLOCK(0) overrides the default output section alignment because + * this needs to start right after .head.text in order for fixed + * section placement to work. + */ + .text BLOCK(0) : AT(ADDR(.text) - LOAD_OFFSET) { +#else .text : AT(ADDR(.text) - LOAD_OFFSET) { ALIGN_FUNCTION(); +#endif /* careful! __ftr_alt_* sections need to be close to .text */ *(.text .fixup __ftr_alt_* .ref.text) SCHED_TEXT