Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2892911ybv; Mon, 24 Feb 2020 13:50:54 -0800 (PST) X-Google-Smtp-Source: APXvYqwduFcGM0leK2RnCenKdNaX1Aor77WauvI1mJwHt51XVbDGjWrQvt350xqTiW7QEgDp+apy X-Received: by 2002:aca:c4c4:: with SMTP id u187mr959531oif.120.1582581054316; Mon, 24 Feb 2020 13:50:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582581054; cv=none; d=google.com; s=arc-20160816; b=PUsbFlhTO9t8T4QT+E0fd5SegwAYHoINqMRKIedLhTtm7drtK54Hucf6xkt5tbbL0M zlNHKGi2aR/i/hIgp2/+HHjHxRmSFpGvc5AmQDpOjh/iVx0+ivUk99i8KYip631Lz3xl FVKxrJ8pZFgefpKZHuPIyUvYNOwOMhMesADuPzOmYPyMDqdMhJuEjq4fgHWumYrFk+pC AZ2CZiEOHXv9+NcR1zqzXqunJ0vLZrFAgrbV8L3mmgQIuPwr4ACkwMQYdSfrzyU9vfVA zuK3AOtF+fhandjFMFV6e/srYU8dBUdkmkY2HaJDqaSj9KRLefPHQC/jYswbCADMVi5S 0ZrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:date:from:dkim-signature; bh=rwxcsAsN75o6auj6h/UwQ4eouOT0rdFuNimYtBXVVqI=; b=QPcnmHJDjNGzSQYJ6ejXjD9EIRk2x9kIbbg0EDvhGDMHbFo3ABMNyyZRJBdzS5W2Dh nAHuY/eCxsyB3usS5gD+l8gl3m+E4UJ3Iw2yIL4ZMvKcxY1CSH+7qgw6/5wuuS8VxXJ+ /pDd33ZGWHuYjDlSLpdhfDF3CUJGS5zTw2wxKGS8jE221PIKGwOLIDQlbeUGtlyyCqwc gLWtEFYbKErKpRgZKeMOGXqP8qtw/fHLVAV71JyJi75646QzgyDkBoPoFG1KUN3KtEmt /+1bg29sMhIqVG1Wkig5J/nLecFGzgQ+cVGEzyFcqrtcjpH/mKOW36pPahPMiaqI69st RP6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=EMh21tWV; 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 x19si7087332otk.89.2020.02.24.13.50.37; Mon, 24 Feb 2020 13:50:54 -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=fail header.i=@gmail.com header.s=20161025 header.b=EMh21tWV; 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 S1728081AbgBXVst (ORCPT + 99 others); Mon, 24 Feb 2020 16:48:49 -0500 Received: from mail-qk1-f196.google.com ([209.85.222.196]:46263 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727459AbgBXVst (ORCPT ); Mon, 24 Feb 2020 16:48:49 -0500 Received: by mail-qk1-f196.google.com with SMTP id u124so10077163qkh.13 for ; Mon, 24 Feb 2020 13:48:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=rwxcsAsN75o6auj6h/UwQ4eouOT0rdFuNimYtBXVVqI=; b=EMh21tWVMiKtiMX/15mlFW2bkqdUQzzSFFTAwEgTUc+9dfctVYJVnF2sKau3SsZwyd rz9qJ8H6WOhD5TCqnWWhlB2a2KsmTREx1Fn1CKeeia6tqHROYd0RrQzIc4RoASmXTZpE TEkdXXtrOjxqJ9Ty9jRFJCNytmMnaToeuugYwoR2CR/hkhR/X4n7HllPU+PTGZ73NdBB uccc8HzbvJO3ywnozyzL3S1m7I9yN+uhXIHDuVCwIvVjLsqgV7qpJQO5N0sB3pjuO/VK n1MG6Tejq9uTKlBLRW6WfBYZKe0mB1erHdHY9QSveOxTIsm8pzvGD69lrM7IiHx75lFL vKQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:date:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=rwxcsAsN75o6auj6h/UwQ4eouOT0rdFuNimYtBXVVqI=; b=GNkIgcZ6Cm0ZSK9Ek52meN9sRFElm+T9GNGc4F8/U5Sk2jEqFqk+4KBxInWh6yNoMr bWnZDr5auO+LcVFSKyZ/+uyyAoUTHq+LkuzIxWImJciAwJXBda1JhOnqWB+rl+4lOYIx 9vdk8fYO711cgj4tt8dwmpbjbddLgBrJUwmfJyEWkw5UjRMpxUXXkM4lDEhpIZcR2GaW Gs+AzQflLZqpEVqx3oPRufXj2OFwmHa2qvpuQposrl8XXJP8zEvJuF8Y2DlSYSl+L0bh 3nsgpjZFz7zYPv7QIgSCRagLEvRLG165y8g7WxnoGyIx5k+XFH+NOQPVhoZzdgmPiJRn 3iug== X-Gm-Message-State: APjAAAVrqUzCOkwpO4tv1pWvP55Da5+QMdbaH9mfg+f+ye99N5QjgMYR Ft5uzETj96pUBGeN9CdU2ftHM+xgQno= X-Received: by 2002:a37:a78d:: with SMTP id q135mr48484895qke.158.1582580928204; Mon, 24 Feb 2020 13:48:48 -0800 (PST) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id m27sm6760596qta.21.2020.02.24.13.48.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Feb 2020 13:48:47 -0800 (PST) From: Arvind Sankar X-Google-Original-From: Arvind Sankar Date: Mon, 24 Feb 2020 16:48:45 -0500 To: Fangrui Song Cc: Nick Desaulniers , Michael Matz , Arvind Sankar , Borislav Petkov , Nathan Chancellor , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , LKML , clang-built-linux , Kees Cook Subject: Re: [PATCH 2/2] x86/boot/compressed: Remove unnecessary sections from bzImage Message-ID: <20200224214845.GC409112@rani.riverdale.lan> References: <20200222050845.GA19912@ubuntu-m2-xlarge-x86> <20200222065521.GA11284@zn.tnic> <20200222070218.GA27571@ubuntu-m2-xlarge-x86> <20200222072144.asqaxlv364s6ezbv@google.com> <20200222074254.GB11284@zn.tnic> <20200222162225.GA3326744@rani.riverdale.lan> <20200224212828.xvxl3mklpvlrdtiw@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200224212828.xvxl3mklpvlrdtiw@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 24, 2020 at 01:28:28PM -0800, Fangrui Song wrote: > Hi Michael, please see my other reply on this thread: https://lkml.org/lkml/2020/2/24/47 > > Synthesized sections can be matched as well. For example, SECTIONS { .pltfoo : { *(.plt) }} can rename the output section .plt to .pltfoo > It seems that in GNU ld, the synthesized section is associated with the > original object file, so it can be written as: > > SECTIONS { .pltfoo : { a.o(.plt) }} > > In lld, you need a wildcard to match the synthesized section *(.plt) > > .rela.dyn is another example. > With the BFD toolchain, file matching doesn't actually seem to work at least for .rela.dyn. I've tried playing around with it in the past and if you try to use file-matching to capture relocations from a particular input file, it just doesn't work sensibly.