Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp8483778rwp; Wed, 19 Jul 2023 10:23:25 -0700 (PDT) X-Google-Smtp-Source: APBJJlGilR9F9Kpzwq90duxXIOuZPWTEf1wp/wv3vNLuUIxhN9NCobwSmg/z8BuVqajomrb2Vg5z X-Received: by 2002:a17:906:2dd:b0:987:fe18:1c56 with SMTP id 29-20020a17090602dd00b00987fe181c56mr2791452ejk.47.1689787405456; Wed, 19 Jul 2023 10:23:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689787405; cv=none; d=google.com; s=arc-20160816; b=mcPOlukUkZyDsn1C8BUWU8hjsIqYPEsNVcdhK2j4j2OiIk1gY9QG/Gt83mDoHaIdzW pRD1Gs0CNNv5rACkD6/o3oTloYR5ljKkkfY5nt5y0Dp0CWn5G/WMynBimNonl6+V9oO4 6moaiuuWJzOTeXANqrRaXYYI3pesMJlbDDQf/mO9Qdv7ePYfyiSWKaX5Uv5GoliAkFF1 An3VEwty04d6H9j23EnOrn5woNkTaVjDt7oHctlIoyLuG/fx4gyeYtMFcFw/jGlTGVz/ 6wrIPJN6fB9Fl2wgfQ+1OSCn/GD4GG4GRX/8VwJ250mmTGnnmduTPGR7EjI9DQCWV2FQ 5sKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=HirW/v5+b+1SdqjL/ANp5wg8zZf/k+V30O9KLgN/N70=; fh=XyVJJUgZwds4nPASqCSQAM707/iDTo1zZJGlu4X2ERU=; b=m07fGlIdXZDT9TnWNVSbBbZQgdVU+0Dg/Ga2CHE7rYy+ufTmVcfVGdUWtfHd05xE3w xDja+9M1G01c8mZtg/pJkc5J09Cqg68WriWwedvEL16d1hquaMSzIuEVaFYkalovNlwA RSJU8pWLWkktUY3jPi9dyT9S37TluC4UslLf+qPMbHnTHs0RyqKyjN0DcCBmqJH2cikv DGDebyxxv/ROHQWTxdpr91V5zJiUVngJ3brG2/OTd7T7cSCkc94LwTnPQNC3ij3OqtZg FJrtXBDSfuOs2FVy18ywxIczOB6RhjLi6EfuCX4YzhnDAzNquso3edVS4WLaLkxYutIE ISTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="VCV7i/rq"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u13-20020a170906408d00b009769ff4d234si3268258ejj.58.2023.07.19.10.23.01; Wed, 19 Jul 2023 10:23:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="VCV7i/rq"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230497AbjGSRK6 (ORCPT + 99 others); Wed, 19 Jul 2023 13:10:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229566AbjGSRK4 (ORCPT ); Wed, 19 Jul 2023 13:10:56 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB4421731 for ; Wed, 19 Jul 2023 10:10:55 -0700 (PDT) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1689786653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=HirW/v5+b+1SdqjL/ANp5wg8zZf/k+V30O9KLgN/N70=; b=VCV7i/rq/r0OL4jnSJIIRL/zVJue6doxKGkZH+i7m0hs/Cfhjz/jegsB5NdLDGwXEHdjyw /ZOmHHfes+BqR6Q/h1EPFYzm20N5ipMdgPzOhtq+8js88qDlgxvA2bIonXFZ47B6CNNoyz 7QOPGWnRjFfFC4KsRkXdKclpJJv3lNkO67MscLxuiabDWHqb+802i2C0vmdublGmeW77d4 D56pKH3R562QDJpYiHlmAgMZYVPE6n+nOZjxo5n3xTHvmLLCtymhjdeN2F4frQi2fXqwoT EwehAjolwLasKc5mSGO1lQCoYL6m+d7AcG4Nv/uNFFyL03bOPpTarIRB+YSiHA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1689786653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=HirW/v5+b+1SdqjL/ANp5wg8zZf/k+V30O9KLgN/N70=; b=D9aexrnqUIp5mA5MRwcJyGhIXmpsWaxRLo3Bkm64oVqLbuydeZ3Ed3SAlRECuCskCaNEmK 2Nl6q/BAahE/TFBQ== To: Michael Ellerman , Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] powerpc/build: vdso linker warning for orphan sections In-Reply-To: <87ttu0i095.fsf@mail.lhotse> References: <20230609051002.3342-1-npiggin@gmail.com> <871qh6wcgb.fsf@jogness.linutronix.de> <871qh5jrz2.fsf@mail.lhotse> <87o7k9l2oj.fsf@jogness.linutronix.de> <87ttu0i095.fsf@mail.lhotse> Date: Wed, 19 Jul 2023 19:16:50 +0206 Message-ID: <87v8efu8rp.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,INVALID_DATE_TZ_ABSURD, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Michael, On 2023-07-19, Michael Ellerman wrote: > I regularly test with a gcc 5.5.0 / ld 2.29 toolchain and gcc 13.1.1 / > ld 2.39, and I haven't seen the warning. I tried a bunch of others and > can't reproduce it. I will send my config in a separate email (without the lists in CC). Building the vdso_prepare target is all that is needed. > Can you confirm that this makes the warning go away? > > diff --git a/arch/powerpc/kernel/vdso/vdso64.lds.S b/arch/powerpc/kernel/vdso/vdso64.lds.S > index bda6c8cdd459..286e1597c548 100644 > --- a/arch/powerpc/kernel/vdso/vdso64.lds.S > +++ b/arch/powerpc/kernel/vdso/vdso64.lds.S > @@ -85,7 +85,7 @@ SECTIONS > *(.branch_lt) > *(.data .data.* .gnu.linkonce.d.* .sdata*) > *(.bss .sbss .dynbss .dynsbss) > - *(.opd) > + *(.opd .rela.opd) > *(.glink .iplt .plt .rela*) Hmmm. Not sure what that would change. And indeed it does not make the warning go away. Doing some testing it seems that previously .rela.opd was being silently placed in the .rela.dyn section. So doing that explicitly obviously gets rid of the warning: Index: linux-6.5-rc2/arch/powerpc/kernel/vdso/vdso64.lds.S =================================================================== --- linux-6.5-rc2.orig/arch/powerpc/kernel/vdso/vdso64.lds.S +++ linux-6.5-rc2/arch/powerpc/kernel/vdso/vdso64.lds.S @@ -69,7 +69,7 @@ SECTIONS .eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr .eh_frame : { KEEP (*(.eh_frame)) } :text .gcc_except_table : { *(.gcc_except_table) } - .rela.dyn ALIGN(8) : { *(.rela.dyn) } + .rela.dyn ALIGN(8) : { *(.rela.dyn) *(.rela.opd) } .got ALIGN(8) : { *(.got .toc) } But if the goal is to get rid of .rela.opd then the question is: why is the linker complaining about it being discarded? John