Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2332101ybl; Thu, 9 Jan 2020 10:52:23 -0800 (PST) X-Google-Smtp-Source: APXvYqyAPdco9jtgT1uz5DZGH+Mo3oY9IG/OeXR7OeiCAMiz9QiCBhkegfkZcVjgsusLs5hs9PfG X-Received: by 2002:aca:3141:: with SMTP id x62mr4124857oix.108.1578595943782; Thu, 09 Jan 2020 10:52:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578595943; cv=none; d=google.com; s=arc-20160816; b=rZPa9lfbwo0Z66PiNRydNbJ2JKcnQ54KEoX9Cw67zJjAGD/LeW4/GmewKRHwmpt/2y nVtgz52vazS0IShK0RVKX7Po6Al08X3JH1B+JFLASxvyVv/5U+/fYvZ+X/sptUMbe6VE 2fJnFy5CsaQRsOI0Sbr0nDj8FOTffeWqY1JmxaQHO2ZQ5u76f2fHqwFMviBltlbe9mfu ajFm/PXj36JdOz5xGOPhWc04+PthclEg72S7xjQHqcommnDxvKhHDibO961tHo5mH5Mn o9fFfswsExZZ7Af594Qny4pw2aA9Vl6ZuMw/O8hdx3vuQdzKY8+NhcgP9QBHdd8Yl+85 vsoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=kq0gWjFvasYsms+f/wE6GRRcFpiCXufjwhyt2Hb0yVU=; b=gTHVcQGwXcSXgS3+R8Q5ITcqsa0bL+J8qoKJ2omvp9+Xh7Qev6Wz0HmYkX690Hq71D eqJp7TkqbQRlDxPw6hwhxF8ECNLVxLmagi5m2zjyO05cunvDt12FCT1etFlJg4vR3IjY QXLnxTGtfMOQIQJCNq+HzDVJXvazP9N1pipYb2AWQSRXyniu7gnT2uy/+iecuGQGmOgC 3729y5FCNAEyHv8NZ0jSG6Iyo5kfvpbZxQXM0Qr4+Pxa7fHDDsyAtrBjbQ6c/DQYX0as CDjfSKjdbwH9presumEqtLfY6llf7dkDeBJdMfgWgOmnTDypFst+VFzTNjiDMmrNZWvX 0D0A== ARC-Authentication-Results: i=1; mx.google.com; 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 p21si4648591otk.162.2020.01.09.10.52.07; Thu, 09 Jan 2020 10:52:23 -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; 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 S1730576AbgAIPCY (ORCPT + 99 others); Thu, 9 Jan 2020 10:02:24 -0500 Received: from mail-qv1-f68.google.com ([209.85.219.68]:33927 "EHLO mail-qv1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730273AbgAIPCW (ORCPT ); Thu, 9 Jan 2020 10:02:22 -0500 Received: by mail-qv1-f68.google.com with SMTP id o18so3081122qvf.1 for ; Thu, 09 Jan 2020 07:02:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kq0gWjFvasYsms+f/wE6GRRcFpiCXufjwhyt2Hb0yVU=; b=DEZVAly1nipDho5rwZxCz+fYCqHamOfa8Asgm0/xPo2c0q+OWVsABBil6mVC1VSg9o XAbq8Wy4myMiec7340PMgZBYuB5zUku0QQNRBwlOOZEWIhyf9ZrpeuwtZzZ1J686guhj 34R4S/xzCYRSqcCt/8/PyZTvpbjI+d+jbwnDvFhTUJT1Opwga/gOBdNumCi1NywaS2nF Tm1W5q7ksPjZJDUxARqSqvK9KgkV+NcpXrV4zhie1zu2p9+UEJ2S9b3ZVBbVugv2lv8P e1Oo2rXAXriOg0GWxtEkJb6ANHQr8PJjm04xCVwNerjtuNHpu0Jh5/hF2gA0DJb0r4EN SxOQ== X-Gm-Message-State: APjAAAVDTEvFm8X5NwKyqxJWphCGbCsGZeQfjk0rl1DHMXuU+QW4LhfL BNXshPcP9SDj8MiV/tJZbhc= X-Received: by 2002:ad4:5562:: with SMTP id w2mr9248570qvy.147.1578582141192; Thu, 09 Jan 2020 07:02:21 -0800 (PST) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id t73sm3217837qke.71.2020.01.09.07.02.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jan 2020 07:02:20 -0800 (PST) From: Arvind Sankar To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" Cc: x86@kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] x86/boot/compressed: Remove unnecessary sections from bzImage Date: Thu, 9 Jan 2020 10:02:18 -0500 Message-Id: <20200109150218.16544-2-nivedita@alum.mit.edu> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200109150218.16544-1-nivedita@alum.mit.edu> References: <20200109150218.16544-1-nivedita@alum.mit.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Discarding the sections that are unused in the compressed kernel saves about 10 KiB on 32-bit and 6 KiB on 64-bit, mostly from .eh_frame. Signed-off-by: Arvind Sankar --- arch/x86/boot/compressed/vmlinux.lds.S | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/x86/boot/compressed/vmlinux.lds.S b/arch/x86/boot/compressed/vmlinux.lds.S index 508cfa6828c5..12a20603d92e 100644 --- a/arch/x86/boot/compressed/vmlinux.lds.S +++ b/arch/x86/boot/compressed/vmlinux.lds.S @@ -73,4 +73,9 @@ SECTIONS #endif . = ALIGN(PAGE_SIZE); /* keep ZO size page aligned */ _end = .; + + /* Discard all remaining sections */ + /DISCARD/ : { + *(*) + } } -- 2.24.1