From patchwork Mon Apr 23 11:01:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mathieu Malaterre X-Patchwork-Id: 10356767 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 33E47601BE for ; Mon, 23 Apr 2018 11:02:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 252F4284AA for ; Mon, 23 Apr 2018 11:02:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 19DB728A6C; Mon, 23 Apr 2018 11:02:07 +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 B97F728A6B for ; Mon, 23 Apr 2018 11:02:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754919AbeDWLCA (ORCPT ); Mon, 23 Apr 2018 07:02:00 -0400 Received: from mail-ot0-f178.google.com ([74.125.82.178]:36079 "EHLO mail-ot0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754846AbeDWLBw (ORCPT ); Mon, 23 Apr 2018 07:01:52 -0400 Received: by mail-ot0-f178.google.com with SMTP id p2-v6so16686132otf.3; Mon, 23 Apr 2018 04:01:52 -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:content-transfer-encoding; bh=3QlgBGt/6USOC0d92rNri9qdNd/OQeuH7+aYZ1jWlXk=; b=aav6/2D9HAWz0UX0af3dJVf3elUtAX0CoX9Eg2Wv+jwGRzQahHn6sOO9amyahAuqbP QTr3Gtnth2HeqEV+N8P4o4c7DV9Nwoba2w83xN2t+qXJ/1ZTACOO327rkkNcWHb1UZVg yko6Cl0qTG5XKfGS0X62+JqdEf2mx5KUM2XJ3IsFTpqFuwPrtnRLfl2Do6Zm/smAfbRL Oxx5tqAyP9FnzpzRf31Hd+xJNxZp3YCvxocCDobyGdx1pIZYchARhMn+HqyfHVSBkeuL 6BQpkAxi5x2Qh6Q/k5nPPboz79COmVNmoySy0l84fbQLpAS3bLeZ/UIgSfPBhQ7A4zsk rYCg== 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:content-transfer-encoding; bh=3QlgBGt/6USOC0d92rNri9qdNd/OQeuH7+aYZ1jWlXk=; b=TrlltfDJL/IrlbNY4wpIQIuZwapWNMOtjWLxUIvznmewqbKmnNnjwOR9doXqIpbRC1 VAp3KcXAxXLGmF9fTNI8WJWA3Kcx+YHQcyigw63rji1zOxIZUm+SDBIaJg3T603AFk2W lywycEw+GMxt10KpCDy9HjZ19myabz7rL7IirSCIbTPSB5nNMNpGzsgQ2HdkYIzy/8ZF mC2liNqbG6K2+rW2Mi1uSLQr3+Y2g0FFkp2DZCOFfWBFjNsg7Bu9Fz29osvZWRk2M0En rS89ZJQPHGFoxAf7fKPKMP0tFK+nItC7iPwBsnhR9tBlXx4ulrdOke/nebDUZpw2tX2G FhEg== X-Gm-Message-State: ALQs6tBQMzPtWFcQILSERoTFRQWkfuS4tEwEHa3WLZpnWcdUqCelxUqn GZLPQAafY/H9FFae9k+F3ldu261Ayz1fl6WvP+Q= X-Google-Smtp-Source: AIpwx4/9uRC4hX7pHMjlqiO+0eCaR80muR7mU1z5zfApkl8tMoHb1PTkwEqewBNUfLI+4wQ5Qv3ZO8EGH6f6W4WPvj8= X-Received: by 2002:a9d:524d:: with SMTP id q13-v6mr14095173otg.241.1524481312018; Mon, 23 Apr 2018 04:01:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.138.3.5 with HTTP; Mon, 23 Apr 2018 04:01:31 -0700 (PDT) In-Reply-To: <738aa4d6-9313-f484-0510-e965f2881869@c-s.fr> References: <20180420073414.23169-1-npiggin@gmail.com> <20180420073414.23169-5-npiggin@gmail.com> <20180420204104.6e22b136@roar.ozlabs.ibm.com> <738aa4d6-9313-f484-0510-e965f2881869@c-s.fr> From: Mathieu Malaterre Date: Mon, 23 Apr 2018 13:01:31 +0200 X-Google-Sender-Auth: WgtBTZJYU8h_0J69sTuQAm2cErI Message-ID: Subject: Re: [PATCH 4/4] powerpc: Allow LD_DEAD_CODE_DATA_ELIMINATION to be selected To: christophe leroy Cc: Nicholas Piggin , linux-arch@vger.kernel.org, linux-kbuild@vger.kernel.org, linuxppc-dev , Nicolas Pitre 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 Christophe, On Sat, Apr 21, 2018 at 9:16 AM, christophe leroy wrote: > > > Le 20/04/2018 à 22:08, Mathieu Malaterre a écrit : >> >> 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: > > > The file contains also debug symbols, which might differ. > Only the LOAD part of the file is interesting, that's the part you get when > doing ppc-linux-objcopy vmlinux vmlinux.bin -O binary > > You can see it with readelf -l vmlinux Here is what I see: $ diff -u <(readelf -l nick/vmlinux.with) <(readelf -l nick/vmlinux.without) > Christophe > >> >> $ du -sk nick/vmlinux.with* >> 124488 nick/vmlinux.with >> 124004 nick/vmlinux.without >> >> >>> Thanks, >>> Nick > > > --- > L'absence de virus dans ce courrier électronique a été vérifiée par le > logiciel antivirus Avast. > https://www.avast.com/antivirus > --- 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 --- /proc/self/fd/11 2018-04-23 12:59:52.413101612 +0200 +++ /proc/self/fd/12 2018-04-23 12:59:52.417101567 +0200 @@ -5,9 +5,9 @@ Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align - LOAD 0x010000 0xc0000000 0x00000000 0x950f34 0xaad018 RWE 0x10000 - NOTE 0x867640 0xc0857640 0x00857640 0x00024 0x00024 0x4 - NOTE 0x867664 0xc0857664 0x00857664 0x0000c 0x0000c 0x1 + LOAD 0x010000 0xc0000000 0x00000000 0x97ef34 0xadba68 RWE 0x10000 + NOTE 0x87f640 0xc086f640 0x0086f640 0x00024 0x00024 0x4 + NOTE 0x87f664 0xc086f664 0x0086f664 0x0000c 0x0000c 0x1 Section to Segment mapping: Segment Sections...