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 X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36F91C433DF for ; Sat, 17 Oct 2020 00:03:43 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1738522203 for ; Sat, 17 Oct 2020 00:03:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="c4I6GyNY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1738522203 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4CCjsl48f7zDr61 for ; Sat, 17 Oct 2020 11:03:39 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=flex--morbo.bounces.google.com (client-ip=2607:f8b0:4864:20::84a; helo=mail-qt1-x84a.google.com; envelope-from=3djskxwukdasxz2mzrzzrwp.nzxwty5800n-op6wt343.zawlm3.z2r@flex--morbo.bounces.google.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20161025 header.b=c4I6GyNY; dkim-atps=neutral Received: from mail-qt1-x84a.google.com (mail-qt1-x84a.google.com [IPv6:2607:f8b0:4864:20::84a]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4CCjr30T0VzDqx1 for ; Sat, 17 Oct 2020 11:02:02 +1100 (AEDT) Received: by mail-qt1-x84a.google.com with SMTP id b12so2370527qte.11 for ; Fri, 16 Oct 2020 17:02:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:message-id:mime-version:subject:from:to:cc; bh=4qX6R8ATeno1n1khz5HXB0Z4nN7hHOns/0/s7ydkqQw=; b=c4I6GyNYE01O83HBrm121Fa4E4Uhm3NTjTsfEDeBn8m4qwddXVxaE1mKTAV2h72D0G rMUS5zTFupfRRjMFec07LxJCnVr35uqJEtcgPAlwvxhGXKtzMhAj5ZcKuw4c6JLllgBI rmtbipLhtno2XDvH1Bzza8nf/gGRx0JSLSbtEUnLMGVaTsdyoxx2k0w9gNfNfCbM8G9u PzUV3cluEBb/K5HiOvLTSJ7PpzQ98Lk9uSc3+NiHuF1ScjiauTlVByJBFPiDlMLu3Pad rywdCFbi9+FVCVYdgnNjvO2uGMJLyE3vrWv/WkqrhMJ364eWmkzwgBAHlDgKCPx1oYtB M3vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:message-id:mime-version:subject:from :to:cc; bh=4qX6R8ATeno1n1khz5HXB0Z4nN7hHOns/0/s7ydkqQw=; b=A4HkmLAuwOXdmefSkQNb5oRWbO8/1hN5e65ai6nwBCbAvpAzEEpcfCVlztSTq1ik0V 6uc8X4Prrji456SQ4fxGy8jWuV4VRLFl5jLTYVo2msAKBRagg8fi+Y81wF3DY/wkVHwK OXqMhaGNcSeOg7mIKloyf6+ofhUoDkXSomeLwH4QpxxtidXZnwJ1RXVMKOsTaPgzdRk0 Iqa2hJfeJlhBE3g7m1vvxZdUWOxDnBwUeSWaWlikaU+1TCOhw14JZyDSXOKdDtDet2O/ c6hFHU58vbDwvQ23VGrYjQRgr8qV4+S63OqBc4W1UaiTUQDtfeDCvVZqG4rp5NGTU7C4 5WHA== X-Gm-Message-State: AOAM533prTaI1gwVqy3wjo6n2CpvPtxDhYgU6SPEAMiyAzRZU6eBVKyQ Dnf+2Ii63JNYAXlCioaPOCvJ67+MOXrFTmD3LML75UsnFHB0tseLd1brM76s5YEDO/ECdQZfCW6 d1T6CRl36oHi20fqRCnREzEfDbQLiLTSDPeztG+dFWhsuTMdfDkwjyQJLC1ALV6R/AG4= X-Google-Smtp-Source: ABdhPJxwWl1HNU/s7TzUDYtEwiDxZoITL86v6HyrcvOJwJ9+5nfzIE8DoPu/aJLdbEpdeCnCmlAalfTIgw== X-Received: from fawn.svl.corp.google.com ([2620:15c:2cd:202:7220:84ff:fe0f:9f6a]) (user=morbo job=sendgmr) by 2002:a0c:e346:: with SMTP id a6mr6581232qvm.9.1602892918177; Fri, 16 Oct 2020 17:01:58 -0700 (PDT) Date: Fri, 16 Oct 2020 17:01:51 -0700 Message-Id: <20201017000151.150788-1-morbo@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.29.0.rc1.297.gfa9743e501-goog Subject: [PATCH] powerpc/boot: move the .got section to after the .dynamic section From: Bill Wendling To: linuxppc-dev@lists.ozlabs.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fangrui Song , Alan Modra , Paul Mackerras , Bill Wendling Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Both .dynamic and .got are RELRO sections and should be placed together, and LLD emits an error: ld.lld: error: section: .got is not contiguous with other relro sections Place them together to avoid this. Cc: Fangrui Song Cc: Alan Modra Signed-off-by: Bill Wendling --- arch/powerpc/boot/zImage.lds.S | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/boot/zImage.lds.S b/arch/powerpc/boot/zImage.lds.S index a21f3a76e06f..d6f072865627 100644 --- a/arch/powerpc/boot/zImage.lds.S +++ b/arch/powerpc/boot/zImage.lds.S @@ -34,6 +34,17 @@ SECTIONS __dynamic_start = .; *(.dynamic) } + +#ifdef CONFIG_PPC64_BOOT_WRAPPER + . = ALIGN(256); + .got : + { + __toc_start = .; + *(.got) + *(.toc) + } +#endif + .hash : { *(.hash) } .interp : { *(.interp) } .rela.dyn : @@ -76,16 +87,6 @@ SECTIONS _esm_blob_end = .; } -#ifdef CONFIG_PPC64_BOOT_WRAPPER - . = ALIGN(256); - .got : - { - __toc_start = .; - *(.got) - *(.toc) - } -#endif - . = ALIGN(4096); .bss : { -- 2.29.0.rc1.297.gfa9743e501-goog