Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1055558ybv; Thu, 13 Feb 2020 14:56:32 -0800 (PST) X-Google-Smtp-Source: APXvYqwNfOEtaeJGrE1siBSDRx15H4Cj3GRnbOP4vEyL86tOGy5ocOl6j+f8hGH/Zdk0wKQ7e1Yc X-Received: by 2002:a05:6808:8cd:: with SMTP id k13mr4693124oij.4.1581634592738; Thu, 13 Feb 2020 14:56:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581634592; cv=none; d=google.com; s=arc-20160816; b=LadO/b6CQJP5JIJwQwODVfrta/Rx5TkRb+K8m2mhdZKHbRONQVuvK6PnwPAzUok2al YSELPrdV84Fr403h9YQRB+VPhNrf2oCOd1LtyNrg63O7DTB9DWgGoZw33Llk1RaUK/AY uCYJY9UTtdi9i6TB14Ui4GrrlBU+dfAEC4Gvgd6lIU6NpgPN2Widh52SnUfx47X6CY3K UD+ZfJeUgTyHY/1tUcRz6MgX37O0bA0IvYFplFDi5GCRzm+gnuILeKepIXoBp4w/wstg m9XRm7gatKza5id7/XFLmdHQR5vz2aPQiimsXordQcz0wEW8Dyu3GtTPkxr7oYWikhfT AKqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=VbaDWghw4kwOwM3o4hCkHjBsTkcKhGYXr0+o9iH4FG0=; b=uMaRlrZC8E6p6xL3Ao6xCZ7eWCSPNj1GX49F/caeqkjBbDpHeBM/sNUzXW6bjBZkYO F3f1GC2nEFMz3mAJYDqrfx17y+/CtknwLaTzIz7ClDErOpHcys5xCCKRhdAtA9/iT7O6 CUFovoKVdYrqu9nz2gil2G2LnKTZOGDRdsCLxJid4ZmZFMdvucr4gqsiJiIgTiCvi7XX zle7iLkUem5TcIkMjrP3sbPZSHWklikN3WiiDdc3bDtUAuQ7U8KeFL0u/HKkpAV0/aYV O+SkXkODAllTY+LSG8qDFZv0Nii8wz1GpTs3F5czAEWSj+MU+THzUjOl5+Gbh20y4dbp uF9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=AoIpz9KO; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g10si1836374otn.12.2020.02.13.14.56.18; Thu, 13 Feb 2020 14:56:32 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=AoIpz9KO; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727604AbgBMWz7 (ORCPT + 99 others); Thu, 13 Feb 2020 17:55:59 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:43946 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727347AbgBMWz7 (ORCPT ); Thu, 13 Feb 2020 17:55:59 -0500 Received: by mail-pf1-f195.google.com with SMTP id s1so3811884pfh.10 for ; Thu, 13 Feb 2020 14:55:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VbaDWghw4kwOwM3o4hCkHjBsTkcKhGYXr0+o9iH4FG0=; b=AoIpz9KOGj1IaY1uLmMmSESgP9UTTb0zAO/ztru2ySX1/BE27H2mqX60jeLEzme4Ga p+V9ihatwlswfFroiuHEQ7shIYED3YdXI972YsToYRXHqU7x4BFAo2XD/qfyjntUCQUy wcvhCfKXOZFaRrl5s3MJqmhdMNSKWyIHv430Rb9E7SfOlzlmleoRoPwKziXUSQ4Ka4EG 24oK0sLbSq6+ysX1ff53o2c1GGoAmtzf94qwheBeN5kW56PearZJXKRhnfbpfUEFNrQN On+Gy3D1BnnGdCLvtkEVHndOV3rzEei+YUfBveMaGhal3vaTs8ton659e3FxCTEA+13u Qpng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VbaDWghw4kwOwM3o4hCkHjBsTkcKhGYXr0+o9iH4FG0=; b=gOVk+rWDpBxQCNa0mK8ZNzcB0Ste8PL2z1kh42Q6HttqTcqYxymBrsvod3KZA3u+QG S/W/oY4fDNrcgpNtDKLrX0Q+CO4Z6gDIh5Bh4iOaK4gui+ZRd0BNj+QzZogRNX9Hw8GR 3x3DhLTPnZpefHne6rrdHVq84v/Bg0fm/Op+SfEfiFcYExLFyfpPutdCzaBzOI5m6X5o AC6bpsEpT919fD8LM3YrCGz2Hn9FOhjoa9RmJ6zXQ4DASEazliTaZlyy/fHwf2X4u61D XyvBTfUmYM3FwP5r7btY27hmNiFmqWzijgAE7w+cdX/9PlC21BLz0VgGrCjyzB1VsRQ5 a10g== X-Gm-Message-State: APjAAAWUWPKeDPq3lG67OiiVy8ixMngXEu00s5eMQcOeO6YURZ9BCSE2 BrKGBU2XduhgVpoWjDzO+Qs27wNY1QHeHdnSFuMd10Gx X-Received: by 2002:a63:64c5:: with SMTP id y188mr235966pgb.10.1581634558128; Thu, 13 Feb 2020 14:55:58 -0800 (PST) MIME-Version: 1.0 References: <20200213184708.205083-1-ndesaulniers@google.com> <20200213221758.i6pchz4gsiy2lsyc@treble> In-Reply-To: <20200213221758.i6pchz4gsiy2lsyc@treble> From: Nick Desaulniers Date: Thu, 13 Feb 2020 14:55:47 -0800 Message-ID: Subject: Re: [PATCH] objtool: ignore .L prefixed local symbols To: Josh Poimboeuf Cc: Peter Zijlstra , clang-built-linux , Nathan Chancellor , Fangrui Song , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 13, 2020 at 2:18 PM Josh Poimboeuf wrote: > > On Thu, Feb 13, 2020 at 10:47:08AM -0800, Nick Desaulniers wrote: > > Top of tree LLVM has optimizations related to > > -fno-semantic-interposition to avoid emitting PLT relocations for > > references to symbols located in the same translation unit, where it > > will emit "local symbol" references. > > > > Clang builds fall back on GNU as for assembling, currently. It appears a > > bug in GNU as introduced around 2.31 is keeping around local labels in > > the symbol table, despite the documentation saying: > > > > "Local symbols are defined and used within the assembler, but they are > > normally not saved in object files." > > > > When objtool searches for a symbol at a given offset, it's finding the > > incorrectly kept .L$local symbol that should have been discarded > > by the assembler. > > > > A patch for GNU as has been authored. For now, objtool should not treat > > local symbols as the expected symbol for a given offset when iterating > > the symbol table. > > > > commit 644592d32837 ("objtool: Fail the kernel build on fatal errors") > > exposed this issue. > > Since I'm going to be dropping 644592d32837 ("objtool: Fail the kernel > build on fatal errors") anyway, I wonder if this patch is still needed? > > At least the error will be downgraded to a warning. And while the > warning could be more user friendly, it still has value because it > reveals a toolchain bug. Sure thing. I appreciate it, and I'm on board with helping debug or fix any compiler bugs we might have in order to re-strengthen the warning soon. -- Thanks, ~Nick Desaulniers