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=-9.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 5B0BDC4BA24 for ; Thu, 27 Feb 2020 05:01:51 +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 B1DDC2084E for ; Thu, 27 Feb 2020 05:01:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ellerman.id.au header.i=@ellerman.id.au header.b="U+3vRKRG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B1DDC2084E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 48SgWH0wCMzDqWg for ; Thu, 27 Feb 2020 16:01:47 +1100 (AEDT) Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 48SgSs558szDqnT for ; Thu, 27 Feb 2020 15:59:41 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=U+3vRKRG; dkim-atps=neutral Received: by ozlabs.org (Postfix) id 48SgSs2Qdbz9sPK; Thu, 27 Feb 2020 15:59:41 +1100 (AEDT) Received: by ozlabs.org (Postfix, from userid 1034) id 48SgSs1lsJz9sR4; Thu, 27 Feb 2020 15:59:41 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1582779581; bh=gzZcvjGtb+RMOgkmaZCJtDC240VazkRG8nq5VBFy4fU=; h=From:To:Cc:Subject:Date:From; b=U+3vRKRGFu+jrAGsUsnGf73G/h0nI4glOUKHPerTb7Gk49K3F0g6DSObGFKOGictY LC4QMiCm7IBsfz5iEeMkauLt2tqpsB5clZEGhuuclrZtkuj7rxNF7Nu4g4kufRXyg8 XOQDRw+Ms7S25emTLBYVvL3var3MlEGSNVsOmgNXEWjUNwAdyNZcIPWtX9/hrR4ah7 Zib8CxtG33R/Q1G0APk3+qVUcZpJK2tbl4chSM+UKNnFNPxd4r+A0a9hLYG1UGS8uk mTjuaXr0xyyGJzZMYjb+ZixYxKulUZmCEp0pHytSh/1y1ZQ3zi//DlBQEOGhxnQF/J hrLr4EwSNgsGw== From: Michael Ellerman To: linuxppc-dev@ozlabs.org Subject: [PATCH 1/2] powerpc/vmlinux.lds: Explicitly retain .gnu.hash Date: Thu, 27 Feb 2020 15:59:32 +1100 Message-Id: <20200227045933.22967-1-mpe@ellerman.id.au> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: joel@jms.id.au, amodra@gmail.com Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Relocatable kernel builds produce a warning about .gnu.hash being an orphan section: ld: warning: orphan section `.gnu.hash' from `linker stubs' being placed in section `.gnu.hash' If we try to discard it the build fails: ld -EL -m elf64lppc -pie --orphan-handling=warn --build-id -o .tmp_vmlinux1 -T ./arch/powerpc/kernel/vmlinux.lds --whole-archive arch/powerpc/kernel/head_64.o arch/powerpc/kernel/entry_64.o ... sound/built-in.a net/built-in.a virt/built-in.a --no-whole-archive --start-group lib/lib.a --end-group ld: could not find section .gnu.hash So add an entry to explicitly retain it, as we do for .hash. Signed-off-by: Michael Ellerman --- arch/powerpc/kernel/vmlinux.lds.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index b4c89a1acebb..31a0f201fb6f 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel/vmlinux.lds.S @@ -256,6 +256,7 @@ SECTIONS *(.dynamic) } .hash : AT(ADDR(.hash) - LOAD_OFFSET) { *(.hash) } + .gnu.hash : AT(ADDR(.gnu.hash) - LOAD_OFFSET) { *(.gnu.hash) } .interp : AT(ADDR(.interp) - LOAD_OFFSET) { *(.interp) } .rela.dyn : AT(ADDR(.rela.dyn) - LOAD_OFFSET) { -- 2.21.1