Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp360547ybb; Fri, 10 Apr 2020 01:21:52 -0700 (PDT) X-Google-Smtp-Source: APiQypLuuDanO8zbwfexAqkOkSiR9tU9DvWSWOX32N33+BBv0ZyLIO6OKXtD2kDHvcAKOMDB96V5 X-Received: by 2002:a0c:a2a2:: with SMTP id g31mr4118219qva.31.1586506912025; Fri, 10 Apr 2020 01:21:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586506912; cv=none; d=google.com; s=arc-20160816; b=uh6a/5XeqszIz0rjxkCQz1a3UWmIAxYRt38qxOLzubIeHASxd3YiJ5pHnhBU9454b+ JXz9DrL+/xP9moJVPG+Kj14fLd4bZ2GC+2IG0yJlhPdEhWAm+yx4kvr7kFcT4pYv1hxJ fPD7PJ7s0drmqyo49ucr1uR52Jy8tJe0pkGUIDudchniJj4tSysWK6USBqLAxTxeFBDn ES51idNdNfqIH5UkD+j3b3O+0g1obbi5KgpUrHngY397GMEvb6IAG8PtNdc83o+izz6t 59yFIEYw1aqMzdUvhG2jEIKxWxmct/cWdZ4wIDXtvxS9f7Rxg8/VIUQq0vO5sLON+MEG EUrA== 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=1mpV4Mf7Y77XGozS0frTPSXF0u4ZxEhOukl8sluGqHs=; b=JWFqLBmVNRrgNpauMfuOPsj2xduPCOvLZUtW0+FL+uCuTglUlA+Sud57eTS4se1xO7 Pl7rOmg0akZE+BBdfdXnpTVAg4BS+b+gDQOK5mZRbrO42uNszfVHmCo2yxaAqnvAZFCG /mjulJ8yV+eXzRDz+RGHXv5a490rGjcVsij6DtxoYceCQGMKfIrTX2YtT1WK0JTkwDtZ HiD9SDFopc7tn0voEjkIzL4gVGfa6j0HxeyACadmNEr4EajVPwlopoX7Ha8ubf31Nrai gxct1XLLr2D8rwOnEHawzAm3qJxvNgFt4kjLJL1mNc11Zc4ke38Q5R4FzpohSwjxR2NE C21g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mdiHg9r9; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n82si1016124qkn.80.2020.04.10.01.21.36; Fri, 10 Apr 2020 01:21:52 -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=@kernel.org header.s=default header.b=mdiHg9r9; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725914AbgDJIUy (ORCPT + 99 others); Fri, 10 Apr 2020 04:20:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:35544 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725839AbgDJIUx (ORCPT ); Fri, 10 Apr 2020 04:20:53 -0400 Received: from mail-il1-f177.google.com (mail-il1-f177.google.com [209.85.166.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7AB5421556; Fri, 10 Apr 2020 08:20:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586506853; bh=5k2owslALNv4JQUFd76NSg+vxcF3iacavyDaDEKz6so=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=mdiHg9r9Nsg8z9iAJPD1dpeagLc0bAVvUmW+3NmVjSPG/4TtLUyFQ0NRDuZbrM2Ju DZmaI7sFZqVbqF1j9lBUF+XSwvaAVNK1O8EiCx/SEagBBJ99cN5urm+0rIlNkJcgrN lXMa8YhK+KFQ68twSAgBYZ/YAT8lUNh0uy86HLik= Received: by mail-il1-f177.google.com with SMTP id p13so1203454ilp.3; Fri, 10 Apr 2020 01:20:53 -0700 (PDT) X-Gm-Message-State: AGi0PuY6JGIBrch6AVJ9AcRJCPwk0sENvo0pcYvSZuPRmCB8m73bHe/N hb3v3+i/KLjUtVW7dO8L9Ojwe7Qc2iZO5AAVntA= X-Received: by 2002:a92:dcd1:: with SMTP id b17mr4073059ilr.80.1586506852792; Fri, 10 Apr 2020 01:20:52 -0700 (PDT) MIME-Version: 1.0 References: <20200409130434.6736-1-ardb@kernel.org> <20200409130434.6736-4-ardb@kernel.org> <20200409210847.GA1312580@rani.riverdale.lan> In-Reply-To: <20200409210847.GA1312580@rani.riverdale.lan> From: Ard Biesheuvel Date: Fri, 10 Apr 2020 10:20:42 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 3/9] efi/x86: Move efi stub globals from .bss to .data To: Arvind Sankar Cc: Brian Gerst , linux-efi , Ingo Molnar , Thomas Gleixner , Linux Kernel Mailing List , Arnd Bergmann , Borislav Petkov , Colin Ian King , Gary Lin , Jiri Slaby , Sergey Shatunov , Takashi Iwai 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, 9 Apr 2020 at 23:08, Arvind Sankar wrote: > > On Thu, Apr 09, 2020 at 04:53:07PM -0400, Brian Gerst wrote: > > > Can we use the -fno-zero-initialized-in-bss compiler flag instead of > > > explicitly marking global variables? > > > > Scratch that. Apparently it only works when a variable is explicitly > > initialized to zero. > > > > -- > > Brian Gerst > > Right, there doesn't seem to be a compiler option to turn off the use of > .bss altogether. Yeah. I'll try to come up with a way to consolidate this a bit across architectures (which is a bit easier now that all of the EFI stub C code lives in the same place). It is probably easiest to use a section renaming trick similar to the one I added for ARM (as Arvind suggested as well, IIRC), and get rid of the per-symbol annotations altogether.