From patchwork Wed May 2 09:17:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Malaterre X-Patchwork-Id: 10375259 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0DC706037D for ; Wed, 2 May 2018 09:18:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 022802894A for ; Wed, 2 May 2018 09:18:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EB30828DFB; Wed, 2 May 2018 09:18:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7DE2E2894A for ; Wed, 2 May 2018 09:18:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751095AbeEBJSQ (ORCPT ); Wed, 2 May 2018 05:18:16 -0400 Received: from mail-ot0-f193.google.com ([74.125.82.193]:36585 "EHLO mail-ot0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751080AbeEBJSN (ORCPT ); Wed, 2 May 2018 05:18:13 -0400 Received: by mail-ot0-f193.google.com with SMTP id m11-v6so9610793otf.3; Wed, 02 May 2018 02:18:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=D9JAoApgKeq7o+ApsZr7pm3a0FbqYYwJe3CytYuqntI=; b=PmKpC/OFXR84EsLq2KiH9elSwzJYKvshJxvDnybexDXIyG9oknm5sBLQIc9m59Fjyt Yq6qu/VmVh8PoLcLiS93SwqJfJSn0zFGCATI+1MUFQgZaufInQ9MSSBGuyQOySso2T83 kTJtsMlMKKTdXic+BNuW91BTd+mNBq5GiVqBKSx//7t7hbpHpkregJ/dswYFi1mWgyVO QtCOR2wSeMmIvT1jC5a9386Ab96EcqDo6QS88TMX0NIx8/BmiwLBkN53LIHOMOaHR793 132QLi/r1R4Eapa4EohGirFpikKECZxuE4QJmfzRVQ9va+82KeSNUsUmrLG4ItuxvvPO 1cVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=D9JAoApgKeq7o+ApsZr7pm3a0FbqYYwJe3CytYuqntI=; b=KyXzaD3tVLYzrrikWQ8GXK0XcsAICcfLCSPdAbsvGiETAIUTu0CjmmhANah4Zrs4jn FiaGjKEaxNGOM1+WZEsqeB4qk8gaAKY/G5/MQb6QWsb69retXi/BCGPdaJsGNcMWgy2S PeSuiGduBri3Hf4fwMqoJY4CC+AqRJFrvYykzgAU/K2h3VDf8VjyToFxamcXesysY1F3 bDBx6IXGDxyBmtv89SFxI2l9cyZkZKQYdfyQBqI5iEzOofymooYZPig8XQ6tiLylPrLc sbfj/QrAmJbNS5IvJ6yFGnV005Rr/gy5GKgKPGzAV50u+v9szKF0gDjhTCuK24kzjwHW OnKQ== X-Gm-Message-State: ALQs6tDtDd0w0MKAhyn2acJJawTOtTfG+3OI3SyHu5VR/ECWd64A3mCe WuecYjJQ0vHfRF7zwKmkfgtnzXV97hTN3k7VnURswQ== X-Google-Smtp-Source: AB8JxZooPnod2co+eD0H4oLve+zSwJHDKjIisKIeRWy15Lod6Y+1HkT9OKzkGnz3WCyMs1zyDlrfEP68zCzx0YznpTs= X-Received: by 2002:a9d:290a:: with SMTP id d10-v6mr12474640otb.334.1525252692843; Wed, 02 May 2018 02:18:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.138.3.5 with HTTP; Wed, 2 May 2018 02:17:52 -0700 (PDT) In-Reply-To: <20180421124838.5facd0f7@roar.ozlabs.ibm.com> References: <20180420073414.23169-1-npiggin@gmail.com> <20180420073414.23169-5-npiggin@gmail.com> <20180420204104.6e22b136@roar.ozlabs.ibm.com> <20180421124838.5facd0f7@roar.ozlabs.ibm.com> From: Mathieu Malaterre Date: Wed, 2 May 2018 11:17:52 +0200 X-Google-Sender-Auth: L2C5CVJQ7G_GW8Z8ck-85Cji1I8 Message-ID: Subject: Re: [PATCH 4/4] powerpc: Allow LD_DEAD_CODE_DATA_ELIMINATION to be selected To: Nicholas Piggin Cc: linuxppc-dev , linux-arch@vger.kernel.org, Nicolas Pitre , linux-kbuild@vger.kernel.org Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Nick, On Sat, Apr 21, 2018 at 4:48 AM, Nicholas Piggin wrote: > On Fri, 20 Apr 2018 22:08:27 +0200 > Mathieu Malaterre wrote: > >> On Fri, Apr 20, 2018 at 12:41 PM, Nicholas Piggin wrote: >> > On Fri, 20 Apr 2018 12:00:49 +0200 >> > Mathieu Malaterre wrote: >> > >> >> On Fri, Apr 20, 2018 at 9:34 AM, Nicholas Piggin wrote: >> >> > This requires further changes to linker script to KEEP some tables >> >> > and wildcard compiler generated sections into the right place. This >> >> > includes pp32 modifications from Christophe Leroy. >> >> > >> >> > When compiling powernv_defconfig with this option: >> >> > >> >> > text data bss dec filename >> >> > 11827621 4810490 1341080 17979191 vmlinux >> >> > 11752437 4598858 1338776 17690071 vmlinux.dcde >> >> > >> >> > Resulting kernel is almost 400kB smaller (and still boots). >> >> > >> >> > [ppc32 numbers here] >> >> >> >> ^^^ >> >> >> >> Do you want somebody else to provide those numbers ? >> > >> > If you have a booting kernel, yes some more numbers would be good. >> >> I've used /boot/config-4.15.0-2-powerpc from my current debian >> package. Rebuild master with and without option, boot ok, load/unload >> module ok. >> >> $ size nick/vmlinux.with* >> text data bss dec hex filename >> 7386425 2364370 1425432 11176227 aa8923 nick/vmlinux.with >> 7461457 2475122 1428064 11364643 ad6923 nick/vmlinux.without >> >> This is not clear why with option the size of kernel is slightly bigger: >> >> $ du -sk nick/vmlinux.with* >> 124488 nick/vmlinux.with >> 124004 nick/vmlinux.without > > Not sure. readelf -S vmlinux may show something. > > To really get lots of detail, you can add to the top level Makefile: > > LDFLAGS_vmlinux += -M Here is what I did: $ git diff Then: $ rm ppc32/arch/powerpc/kernel/vmlinux.lds $ make O=ppc32 ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- W=1 V=1 -> I did not see anything specific. I must be missing one step, but I don't see which one. > Then it will print the link map for you and other details. Actually > it will output several times because we link vmlinux 2-3 times, so > just take the last one. There is a lot of data there. > --- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/Makefile b/Makefile index 619a85ad716b..1a2e3d142a59 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ PATCHLEVEL = 17 SUBLEVEL = 0 EXTRAVERSION = -rc3 NAME = Fearless Coyote +LDFLAGS_vmlinux += -M # *DOCUMENTATION* # To see a list of typical targets execute "make help"