Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp532870ybv; Sat, 22 Feb 2020 08:44:44 -0800 (PST) X-Google-Smtp-Source: APXvYqwOwQLig9FOgyqB+hLVnPFfqW986UXl7mdMu3SByiIDFvlowlxDlx1tNqrHGuG25dGkgkLf X-Received: by 2002:a05:6830:1c8:: with SMTP id r8mr20953590ota.63.1582389884256; Sat, 22 Feb 2020 08:44:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582389884; cv=none; d=google.com; s=arc-20160816; b=AMrK5qBwphlP1gf9b4qgLaUanPns/oh6hoznxhrPqQFnepE6Gmuz/v4A6HGK4Omke0 IwKjsSrS73HwLkiE2neZKN2F5Jr2KF56FeyG2yMOPeXFhzwYUbQkBDRUlal/pRFCLxr9 ncBGcuDMbtKy/6vaAxCQk9k4ZaAgC2Br/aENsSFc+Htu97/f+7gh4dNee9cOmPE5k2tT y1RaLxLC5R23oxdBAzSF9J0AMGrBmZZFgWs+8hu+kus7FhqjGC1GZuZywLA3GgVwk5Ij oB9v4QQ1CcEnr0MB/vvB0ePuMEfe3Y0f76vV1Fw66WA0K7nfNCw1jeqAvUBfDYEsjmoQ kphg== 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=davRPrnHp93f1Lv0/YKPaOSAs3H7scM60qBahhAvztc=; b=TVNPS2kO11CzUj05iYPXvJ28IsUImFB6o+Dun0ghb5b+5kMfpAla90VN9EwdE+O/PH eepmwDKx5R4WDxOfB2BslNQ82g/9gaQOoKrwUZFdwrsPMIVaI7SGBpfaKEI13sxTAzxX TDk6WuY2D0t6Ap76xURIiy2U/yupqtUe+pe7Km6+q7YrzZQO36N8c6YRTfg+oAD0NMyH lfC8ORYhWjxIPKHfTzzKgHilYFnXx0CRdtfRaTqG6ml2E+9WX/b2zQBhlJLLrPFwGnnP rr4UGdj5tSZ01u5qNmevDcdcnVgPHr16RKXTzliIxfnbjkJjzxIClydqN9YJbOhVjJ2U Qftw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=bviH1RPW; 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 z1si3575366otq.21.2020.02.22.08.44.31; Sat, 22 Feb 2020 08:44:44 -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=bviH1RPW; 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 S1726631AbgBVQoX (ORCPT + 99 others); Sat, 22 Feb 2020 11:44:23 -0500 Received: from mail-qt1-f193.google.com ([209.85.160.193]:45579 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725976AbgBVQoX (ORCPT ); Sat, 22 Feb 2020 11:44:23 -0500 Received: by mail-qt1-f193.google.com with SMTP id d9so3620040qte.12 for ; Sat, 22 Feb 2020 08:44:22 -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=davRPrnHp93f1Lv0/YKPaOSAs3H7scM60qBahhAvztc=; b=bviH1RPWtioE2KaAVd6bH4iA541Q4p7D8OL/hVwNV1nEkOx8u6ZqZVK3RuhBeGVvIP zRnCZNpibC9hURy6jgLOACsx+6IMjQesJAUCmZh8JXAoC47V7c+BkZMmd8/yLIy3D8pM /kZdEV/dloJqeqvVd3i1sdKqGhTydCGtEoIFwp9sjNJR+FeUomdo261bQSh/AawPxQwG fpmB/1JBnbQaHAc/C5LGMw2rF8j2YdtFDSaT7rwQYdjzgVh6ac2IWpXNRJDXraloTQ2K YnPCKAsNtOlZsehOmP6CoWD2qtqWD6gJoMfuqWiLXZ0K4hVy29fnmNsGfZXynJUg9cRv XvMQ== 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=davRPrnHp93f1Lv0/YKPaOSAs3H7scM60qBahhAvztc=; b=EFJkp0O2VdJB/HZEE1d0gHh2mrW62JNDNLN4k51FUU+Yz4u2OOgH7vbgwDhJhcCcQw vnnCQD6xYXxTMAjrh2pXEh/+mK3as/xijXFSP39o02/a5RxKbqbEuc4ODi64hK0ee9I4 +Gx2AFEdxnRz+IXZW6G3ULHDC6PPQPJbPbvCmdre6ENFG1RxzUFFOlPSDpAjh6S+4Duf 5Xt5/EUCDothigak6+1ctFNkr+KE4a93kOQnvJ0JjPkJAzQFZu7dXMO7QBBFKdL3Gqm3 UwUM2uvom/hF7auKp90U0pjg9mELU4XSUgtPz+9iIsUL0eVIIfkfsjZo/4bw3u3u/2rR Mhqw== X-Gm-Message-State: APjAAAWAOubp+5vZ30QGwnoRbZQMME5HWUtZBomJeb7nf9Clcg9VyaK6 2fV4iYzx1QqkxZW2QcMfwy4= X-Received: by 2002:ac8:6b4f:: with SMTP id x15mr37560537qts.152.1582389862273; Sat, 22 Feb 2020 08:44:22 -0800 (PST) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id x41sm3345118qtj.52.2020.02.22.08.44.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Feb 2020 08:44:21 -0800 (PST) From: Arvind Sankar X-Google-Original-From: Arvind Sankar Date: Sat, 22 Feb 2020 11:44:20 -0500 To: Nathan Chancellor Cc: Fangrui Song , Arvind Sankar , Borislav Petkov , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Michael Matz Subject: Re: [PATCH 2/2] x86/boot/compressed: Remove unnecessary sections from bzImage Message-ID: <20200222164419.GB3326744@rani.riverdale.lan> References: <20200109150218.16544-1-nivedita@alum.mit.edu> <20200109150218.16544-2-nivedita@alum.mit.edu> <20200222050845.GA19912@ubuntu-m2-xlarge-x86> <20200222065521.GA11284@zn.tnic> <20200222070218.GA27571@ubuntu-m2-xlarge-x86> <20200222072144.asqaxlv364s6ezbv@google.com> <20200222074242.GA17358@ubuntu-m2-xlarge-x86> <20200222153747.GA3234293@rani.riverdale.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200222153747.GA3234293@rani.riverdale.lan> 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 Sat, Feb 22, 2020 at 10:37:47AM -0500, Arvind Sankar wrote: > On Sat, Feb 22, 2020 at 12:42:42AM -0700, Nathan Chancellor wrote: > > > > Thanks for the clarity. With your suggestion (diff below), I see the > > following error: > > > > arch/x86/boot/compressed/vmlinux: no symbols > > ld.lld: error: undefined symbol: ZO_input_data > > >>> referenced by arch/x86/boot/header.o:(.header+0x59) > > > > ld.lld: error: undefined symbol: ZO_z_input_len > > >>> referenced by arch/x86/boot/header.o:(.header+0x5D) > > make[3]: *** [../arch/x86/boot/Makefile:108: arch/x86/boot/setup.elf] > > > > It seems like the section still isn't being added? > > > > Cheers, > > Nathan > > It seems like lld also doesn't treat .symtab as special and is > discarding it, but that one is actually essential to be able to build > the bzImage. > > The sections that GNU ld ends up discarding via that *(*) directive are > .dynsym, .dynstr, .gnu.hash, .eh_frame, .rela.dyn, .comment and > .dynamic. > > Out of these, only .eh_frame has any significant size, and that's what > we discard in the other linker scripts (in kernel/vmlinux.lds.S and > boot/setup.ld). > > It looks like it would be safest to just do > /DISCARD/ : { > *(.eh_frame) > } > instead. If you can double-check that that works with lld, I can send > out a new version. > > Thanks and sorry for the breakage. Tested with lld and it seems fine with that change. Boris, should I send the fix as a diff to the current patch in tip, or as a fresh one that can replace it? Thanks.