Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp958211ybb; Fri, 3 Apr 2020 15:14:35 -0700 (PDT) X-Google-Smtp-Source: APiQypIBGlsTzV/4FAXwlslDadUPiSyE2nQYbvlMVOzBBX+pByd9ncXaqKeiUp0UGmgAyW4doYCf X-Received: by 2002:a9d:748a:: with SMTP id t10mr8874213otk.244.1585952075061; Fri, 03 Apr 2020 15:14:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585952075; cv=none; d=google.com; s=arc-20160816; b=L/xosnqghgz23inqxJSk8n69pATkuFSZvhZi0KGrHJDBSJWlsinG1Hp/XRAEnug+ub ZibnlL4ra32CaAr0mPgC0z8WhRJ9cKIxIdNy4REYd7ByMaaAXiJwAbZa9bM2fz40Vgma L4kK52OIFMz5ZMKS1yd/KSHBXq02Fprkn5LBxP0gytrGjNL0PEKISRO7T7MQatwpL8Sb quJk+oz/kfz+Rp19zLJqYwbDVo6Pt8iHA4NiBQWStDq6Ebzz9cOJVisOJg+AgtIK4YFq 9j5BBbI5Jt0fpBUH6XVLnVfswG7G8fKTwnEvp4NNTsSuDQ95P5i7ghRzob63U0giX0rJ hgqA== 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=KG760e3FMnxv8FnXQXJos6didPWpKWfKfgbzSvtqHEQ=; b=ywtVQ7RjpLCpQFUel7tWWd4a/s0l5dg2aGC/JUA577MokKrkNLNMYg/O8icoVZdySu YhZZDyE8NEstvz+mZ7t4gD+4FjSirr68WAcxcv8bvsx7djsfe/UxxIHR4EcZAFCVqIF8 tOz4BA9w7NefpVQYtH4DUnkEDbIYRsD79P4EIOGc4+pUKP+Btr48+X1d9e9HI4A7yZyP yggoSVZsdvc1Sk2ahVIwNp+/G+6UDzbnDSC6q9XNLTE7H5Bm4K3Fpvcl1FBz8ccODmtJ 9GuYOdCzuOx9Hy6oFGinSsilPmGl9rsrWeR+4Ng0ktLfunSfUebF8+HSxZCIKuSZgNmz SiuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Hx3rOB44; 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 s133si4223101oig.254.2020.04.03.15.14.13; Fri, 03 Apr 2020 15:14:35 -0700 (PDT) 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=Hx3rOB44; 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 S1728681AbgDCWNs (ORCPT + 99 others); Fri, 3 Apr 2020 18:13:48 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:46912 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727879AbgDCWNs (ORCPT ); Fri, 3 Apr 2020 18:13:48 -0400 Received: by mail-pg1-f196.google.com with SMTP id k191so4204271pgc.13 for ; Fri, 03 Apr 2020 15:13:46 -0700 (PDT) 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=KG760e3FMnxv8FnXQXJos6didPWpKWfKfgbzSvtqHEQ=; b=Hx3rOB443eEQZrxZIQBAXikrznjUBLRFhrltR7kyjDb891bPumReNW789UlwuEUILR YczEn9OeD6o0ynOM81UErQl1gHBI/u3tlZeUJ/aFmeproIsT3fcupz60ixqLDbjDNyIR kWpf8fo0sA204QkwO4hR+Km3wWrmTW9epOzkDJPOseR+qIpyzxTJJ6X6Do4BQdazxf11 uDrQ7VdEUx8n53KF0t/jkdrU/wbzLfb35fwLwm16VxMd3eJNCwBh4VkcJcxpF2/RdGGu Bit7mUrkjHygxMQktAxwhplfZW8QsKK8M3azfO2I0L5mAH4MKsq+OrQRNsFX8Y7rFrDA /ZjQ== 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=KG760e3FMnxv8FnXQXJos6didPWpKWfKfgbzSvtqHEQ=; b=qNcpkNApokguZxIay8yScCsQofZ1Y/SJrgka8PQ2AHx0K8cSmFdA4aRH8vt1Y9K8li dKcgrz7cr/8MXOl/NMEevjfmW88DuaKli70Cc+1V0sg8W4eI25BiiibaDsNXK6n7XrlR iK1nkx5oKoYv5wYypx+XIOvRnrIqEkC/kdFz76HF5ZzZeOzZ04eipByqC8t6f/cgMhi/ KWV84d87iKroIY7nmGCi8yx6Yg4HSE3dsUomBuqw/AdKtUzEPMUzw/mzvnJSkTAlwNbw wLb3F5QH7m0D0/F27ZGJiWh67BkE9Cai//mkcS1rCQByIaVmY9OeCP9wGTAnYU4vzUfa b9IQ== X-Gm-Message-State: AGi0PuYqw/NrPybfdAw7y6wb/oakXfyMZg9/o16u08d7I1dVLZGzFMv2 2cc/2CFkEd/WKJGuloemOei+aj3+6WEd0WXN5Fr/8A== X-Received: by 2002:a63:aa02:: with SMTP id e2mr9458612pgf.263.1585952025437; Fri, 03 Apr 2020 15:13:45 -0700 (PDT) MIME-Version: 1.0 References: <20200325231250.99205-1-ndesaulniers@google.com> In-Reply-To: <20200325231250.99205-1-ndesaulniers@google.com> From: Nick Desaulniers Date: Fri, 3 Apr 2020 15:13:34 -0700 Message-ID: Subject: Re: [PATCH] elfnote: mark all .note sections SHF_ALLOC To: Thomas Gleixner , Andrew Morton Cc: clang-built-linux , Ilie Halip , Vincenzo Frascino , 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 dropping Jeremy; I got bounceback from the email address. Ping for review? On Wed, Mar 25, 2020 at 4:13 PM Nick Desaulniers wrote: > > ELFNOTE_START allows callers to specify flags for .pushsection assembler > directives. All callsites but ELF_NOTE use "a" for SHF_ALLOC. For > vdso's that explicitly use ELF_NOTE_START and BUILD_SALT, the same > section is specified twice after preprocessing, once with "a" flag, once > without. Example: > > .pushsection .note.Linux, "a", @note ; > .pushsection .note.Linux, "", @note ; > > While GNU as allows this ordering, it warns for the opposite ordering, > making these directives position dependent. We'd prefer not to precisely > match this behavior in Clang's integrated assembler. Instead, the non > __ASSEMBLY__ definition of ELF_NOTE uses > __attribute__((section(".note.Linux"))) which is created with SHF_ALLOC, > so let's make the __ASSEMBLY__ definition of ELF_NOTE consistent with C > and just always use "a" flag. > > This allows Clang to assemble a working mainline (5.6) kernel via: > $ make CC=clang AS=clang > > Link: https://github.com/ClangBuiltLinux/linux/issues/913 > Cc: Jeremy Fitzhardinge > Debugged-by: Ilie Halip > Signed-off-by: Nick Desaulniers > --- > Ilie has further treewide cleanups: > https://github.com/ihalip/linux/commits/elfnote > This patch is the simplest to move us forwards. > > include/linux/elfnote.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/elfnote.h b/include/linux/elfnote.h > index 594d4e78654f..69b136e4dd2b 100644 > --- a/include/linux/elfnote.h > +++ b/include/linux/elfnote.h > @@ -54,7 +54,7 @@ > .popsection ; > > #define ELFNOTE(name, type, desc) \ > - ELFNOTE_START(name, type, "") \ > + ELFNOTE_START(name, type, "a") \ > desc ; \ > ELFNOTE_END > > -- > 2.26.0.rc2.310.g2932bb562d-goog > -- Thanks, ~Nick Desaulniers