From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 075652108 for ; Mon, 24 Apr 2023 13:36:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 56A35C433D2; Mon, 24 Apr 2023 13:36:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1682343415; bh=/DqfXu+qW5izewF+kSfBLxoYDo52LAZ+ZZmDVF5XaoY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Pnzkzz8fWi2SSNMUsq4HzuGNLJaeVHJiHH2kt+zzOgBqFvU4KHhI3FzuKAGpvEI5u 0pmx8aphQo3sTpbyJXjPklDSMxnWTplD88QXNZytPTyUIEEMK59EJt9wjBlLSC4I2g XbVSFnpkoJNMoCTMSrXiTirX/SxBlt6Vq4NrfgLc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Pingfan Liu , Ingo Molnar , Nick Desaulniers , Steve Wahl , Dave Young , Alyssa Ross Subject: [PATCH 4.14 17/28] x86/purgatory: Dont generate debug info for purgatory.ro Date: Mon, 24 Apr 2023 15:18:38 +0200 Message-Id: <20230424131121.889146262@linuxfoundation.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230424131121.331252806@linuxfoundation.org> References: <20230424131121.331252806@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Pingfan Liu commit 52416ffcf823ee11aa19792715664ab94757f111 upstream. Purgatory.ro is a standalone binary that is not linked against the rest of the kernel. Its image is copied into an array that is linked to the kernel, and from there kexec relocates it wherever it desires. Unlike the debug info for vmlinux, which can be used for analyzing crash such info is useless in purgatory.ro. And discarding them can save about 200K space. Original: 259080 kexec-purgatory.o Stripped debug info: 29152 kexec-purgatory.o Signed-off-by: Pingfan Liu Signed-off-by: Ingo Molnar Reviewed-by: Nick Desaulniers Reviewed-by: Steve Wahl Acked-by: Dave Young Link: https://lore.kernel.org/r/1596433788-3784-1-git-send-email-kernelfans@gmail.com Signed-off-by: Alyssa Ross Signed-off-by: Greg Kroah-Hartman --- arch/x86/purgatory/Makefile | 3 +++ 1 file changed, 3 insertions(+) --- a/arch/x86/purgatory/Makefile +++ b/arch/x86/purgatory/Makefile @@ -20,6 +20,9 @@ KBUILD_CFLAGS := -fno-strict-aliasing -W KBUILD_CFLAGS += -m$(BITS) KBUILD_CFLAGS += $(call cc-option,-fno-PIE) +AFLAGS_REMOVE_setup-x86_$(BITS).o += -Wa,-gdwarf-2 +AFLAGS_REMOVE_entry64.o += -Wa,-gdwarf-2 + $(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE $(call if_changed,ld)