Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp6950028ybl; Wed, 15 Jan 2020 12:54:53 -0800 (PST) X-Google-Smtp-Source: APXvYqyDxb0HQ+lAX6m5GEr5a0V9BYZxV6ufyZKQ9Kv7cAywI4RTYWHZsNzQZEb+xJWiA4z+7xWB X-Received: by 2002:a9d:664a:: with SMTP id q10mr3859168otm.99.1579121693651; Wed, 15 Jan 2020 12:54:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579121693; cv=none; d=google.com; s=arc-20160816; b=WVxLCHh047ETJjSmki8526uNz4w0nTmPctBmi3EGs4asht10caVOL0ItLosWPfB47P ZgVU+eJMH5Cm1TZR1k266rfNUjziOmid888X906orc101WbJ/R1VHyc+E9QVjIbU2SH6 OJMcEEaoIoTxBUQeo85MMba88cHsqiLOAAyN4b1kvTpWkAl0KnYkUdYp1mHAmmhAsmHL esVy+GkJYyiAcgqwBbTtLYP6xpFcrtb2nAcMjYK0VrjxVMgqzWj/XThkGzliil7hw9UQ UuBIgDv4kZvpg4c/OXd6u89LSRCnzIoaAY2oklpPjsdUj+9rG4ez7VNS2Szecdm6EIhx 0Ypg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:subject:from; bh=CCrm0Ene2t+/J/YcSteNs6v6edhGOYWDIMxhzh2XjRQ=; b=Lvk4KijahaC3qWgsdzWIPUTjE+BSaNHTkyvnvseruerHLv8OlQfoMxrtJ3Tbp1m1q3 nq6DUP9EcO2cleT7bLxFAZy/5htVjGNNCuC6csOG5sTcqHxYXPA70iT1UAs1UeBiKyYy xnOxwdEt2/MQyJ6H/fLWa6zZu3m5D+bxxDh1qwidIBc4x1fQ4H4Fj8ovDuZAxgquraj/ x+Og2dwblIb7DXRkLUdrmPk53W3QZ7V6n22ricgBKD/oZfgTQVYeO+pt5eKPK2xTOU62 dpLx/KoVmA99s+h7Wyw4mmMap2LRBSKAhfVOIeknV6YYAMge65ii8n5l+30wtMR5ZjDM XWig== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p5si11129298oto.116.2020.01.15.12.54.41; Wed, 15 Jan 2020 12:54:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729417AbgAOUsX (ORCPT + 99 others); Wed, 15 Jan 2020 15:48:23 -0500 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:32963 "EHLO relay1-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729263AbgAOUsX (ORCPT ); Wed, 15 Jan 2020 15:48:23 -0500 X-Originating-IP: 79.86.19.127 Received: from [192.168.0.12] (127.19.86.79.rev.sfr.net [79.86.19.127]) (Authenticated sender: alexandre@ghiti.fr) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 161D1240002; Wed, 15 Jan 2020 20:48:18 +0000 (UTC) From: Alexandre Ghiti Subject: Re: linux-next: build warning after merge of the bpf-next tree To: Alexei Starovoitov , Zong Li Cc: Palmer Dabbelt , Stephen Rothwell , Daniel Borkmann , Alexei Starovoitov , Network Development , Linux-Next Mailing List , "linux-kernel@vger.kernel.org List" , ppc-dev , linux-arm-kernel References: <20191018105657.4584ec67@canb.auug.org.au> <20191028110257.6d6dba6e@canb.auug.org.au> Message-ID: <6c03d212-775c-cddb-b0d0-d7b00571694b@ghiti.fr> Date: Wed, 15 Jan 2020 15:48:18 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/14/20 6:23 AM, Alexei Starovoitov wrote: > On Sun, Jan 12, 2020 at 8:33 PM Zong Li wrote: >> I'm not quite familiar with btf, so I have no idea why there are two >> weak symbols be added in 8580ac9404f6 ("bpf: Process in-kernel BTF") > I can explain what these weak symbols are for, but that won't change > the fact that compiler or linker are buggy. The weak symbols should work > in all cases and compiler should pick correct relocation. > In this case it sounds that compiler picked relative relocation and failed > to reach zero from that address. Sorry for the response delay: I now agree that there is nothing weird about those relocations. All compiler/linker I took a look at (arm64, ppc64 and riscv64) correctly emit an absolute relocation to the address 0 in case of a weak unresolved symbol, so there's no buggy compiler/linker. And regarding ppc warning, the kernel being compiled as -pie, the scripts looks for absolute relocations which it considers as "bad", except for one that is known to be weak and that is ignored: I have just sent a patch to fix this script so that weak undefined symbol relocations are not considered as bad. Thanks, Alex