Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1028117ybv; Thu, 13 Feb 2020 14:18:32 -0800 (PST) X-Google-Smtp-Source: APXvYqzyNUQGcnxB6mdSy/XsBYGIgbqQL3vc87Kjfk9WWPnbyAs6AAlwdg8p5DW9OjnXPBDP9jFs X-Received: by 2002:aca:5a04:: with SMTP id o4mr4482892oib.71.1581632312544; Thu, 13 Feb 2020 14:18:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581632312; cv=none; d=google.com; s=arc-20160816; b=iOKz2ErI1v5HORhRbCLmOPnaQyLh+kF7TmhpYoavOERfTfWXx47gNNwGIhQr6F5zXJ OV0+pfcUgsS2TogEZ4X6BuYv5aZyQGh8BSyVNjoCG2K8OGKOUS759x9/551KaOAWyxnX +iFafbafKN4/9jM+d0GO7bZLnzT+GpsHNPPnIsNGKE/Kq93p1orFaE2PCqcLVET+HOfJ XytOyMRDbLD1kjfY5uLgQsj9mBVAseflFYHhmMZdlz2QXEumaUEla1MpNIhWxuD2xgBL nWvVBvwE+2Ryw2zS4DiBzLeSPz+y+EJo6K9T1O+zDg/HM4HiQdnD16358hCDIqmkkQdt ivwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Qi71n+eauOK1OSXi8ZkVfgUb7+wXkbcDfLtR5AJoSms=; b=Uy7H+luv0PYHHMjknV/6PoddyYG3nO6+OykExGLDr/evwMUQ4qWEp+U9DLuTkKK7/F BB4OO6kIJCmsEvobcjZ9JTzrfaX7VGfQLMa5UEtvTHKmM8sIV8cO7wu4XiASj5ZUCyk1 /SzaVm61CQZKenxXh1ohYHXciI2OFd0Grf7fdD9HRIt+6mIKM3SoGkMQgS5bKk8q/yVN 1b2NVEzVctjtTtcEQBpEWRXqcjqZLWufM+vGu5B4D2H4cQFz7cki17BK0czSc/mMfrZ6 eg456oEz2rC++CNCuoayoqwWzJ8xWP6mYymPSegg831nCZXBZR7f+lM4TK0go/pKm//d EL1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YSioyUaV; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l14si1685628oic.222.2020.02.13.14.18.19; Thu, 13 Feb 2020 14:18: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=@redhat.com header.s=mimecast20190719 header.b=YSioyUaV; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727946AbgBMWSK (ORCPT + 99 others); Thu, 13 Feb 2020 17:18:10 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:53134 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727594AbgBMWSK (ORCPT ); Thu, 13 Feb 2020 17:18:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581632289; 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=Qi71n+eauOK1OSXi8ZkVfgUb7+wXkbcDfLtR5AJoSms=; b=YSioyUaVPsB5icC03M223TQ/33iAuCbDn7G0W4Omlo3CyCDi+pDgIQLT+VhBJuzhYD2kdP JV1muXPSVYGPbcIHKPR0JXb8PQs77A+g8EFYhYibNAae78e6/55z44wOPlskIKjZBwppnw WJ37c2qs47bhHp1fSZrrmiFdhkEsS28= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-229-DupnYgKvNvSJ6uPJg0My1A-1; Thu, 13 Feb 2020 17:18:05 -0500 X-MC-Unique: DupnYgKvNvSJ6uPJg0My1A-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9B2E318A6EC0; Thu, 13 Feb 2020 22:18:03 +0000 (UTC) Received: from treble (ovpn-121-12.rdu2.redhat.com [10.10.121.12]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 47C1C1001B28; Thu, 13 Feb 2020 22:18:01 +0000 (UTC) Date: Thu, 13 Feb 2020 16:17:58 -0600 From: Josh Poimboeuf To: Nick Desaulniers Cc: peterz@infradead.org, clang-built-linux@googlegroups.com, Nathan Chancellor , Fangrui Song , linux-kernel@vger.kernel.org Subject: Re: [PATCH] objtool: ignore .L prefixed local symbols Message-ID: <20200213221758.i6pchz4gsiy2lsyc@treble> References: <20200213184708.205083-1-ndesaulniers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200213184708.205083-1-ndesaulniers@google.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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 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. -- Josh