All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Malaterre <malat@debian.org>
To: christophe leroy <christophe.leroy@c-s.fr>
Cc: Nicholas Piggin <npiggin@gmail.com>,
	linux-arch@vger.kernel.org, linux-kbuild@vger.kernel.org,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	Nicolas Pitre <nico@fluxnic.net>
Subject: Re: [PATCH 4/4] powerpc: Allow LD_DEAD_CODE_DATA_ELIMINATION to be selected
Date: Mon, 23 Apr 2018 13:01:31 +0200	[thread overview]
Message-ID: <CA+7wUszDBFQRV78stj_MArnZYFp3ug6UoxH+Y__SWC=fGH2g8A@mail.gmail.com> (raw)
In-Reply-To: <738aa4d6-9313-f484-0510-e965f2881869@c-s.fr>

Christophe,

On Sat, Apr 21, 2018 at 9:16 AM, christophe leroy
<christophe.leroy@c-s.fr> wrote:
>
>
> Le 20/04/2018 à 22:08, Mathieu Malaterre a écrit :
>>
>> On Fri, Apr 20, 2018 at 12:41 PM, Nicholas Piggin <npiggin@gmail.com>
>> wrote:
>>>
>>> On Fri, 20 Apr 2018 12:00:49 +0200
>>> Mathieu Malaterre <malat@debian.org> wrote:
>>>
>>>> On Fri, Apr 20, 2018 at 9:34 AM, Nicholas Piggin <npiggin@gmail.com>
>>>> 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)
--- /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...


> 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
>

WARNING: multiple messages have this Message-ID (diff)
From: Mathieu Malaterre <malat@debian.org>
To: christophe leroy <christophe.leroy@c-s.fr>
Cc: linux-arch@vger.kernel.org, Nicolas Pitre <nico@fluxnic.net>,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	Nicholas Piggin <npiggin@gmail.com>,
	linux-kbuild@vger.kernel.org
Subject: Re: [PATCH 4/4] powerpc: Allow LD_DEAD_CODE_DATA_ELIMINATION to be selected
Date: Mon, 23 Apr 2018 13:01:31 +0200	[thread overview]
Message-ID: <CA+7wUszDBFQRV78stj_MArnZYFp3ug6UoxH+Y__SWC=fGH2g8A@mail.gmail.com> (raw)
In-Reply-To: <738aa4d6-9313-f484-0510-e965f2881869@c-s.fr>

Christophe,

On Sat, Apr 21, 2018 at 9:16 AM, christophe leroy
<christophe.leroy@c-s.fr> wrote:
>
>
> Le 20/04/2018 à 22:08, Mathieu Malaterre a écrit :
>>
>> On Fri, Apr 20, 2018 at 12:41 PM, Nicholas Piggin <npiggin@gmail.com>
>> wrote:
>>>
>>> On Fri, 20 Apr 2018 12:00:49 +0200
>>> Mathieu Malaterre <malat@debian.org> wrote:
>>>
>>>> On Fri, Apr 20, 2018 at 9:34 AM, Nicholas Piggin <npiggin@gmail.com>
>>>> 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)
--- /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...


> 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
>

WARNING: multiple messages have this Message-ID (diff)
From: Mathieu Malaterre <malat@debian.org>
To: christophe leroy <christophe.leroy@c-s.fr>
Cc: Nicholas Piggin <npiggin@gmail.com>,
	linux-arch@vger.kernel.org, linux-kbuild@vger.kernel.org,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	Nicolas Pitre <nico@fluxnic.net>
Subject: Re: [PATCH 4/4] powerpc: Allow LD_DEAD_CODE_DATA_ELIMINATION to be selected
Date: Mon, 23 Apr 2018 13:01:31 +0200	[thread overview]
Message-ID: <CA+7wUszDBFQRV78stj_MArnZYFp3ug6UoxH+Y__SWC=fGH2g8A@mail.gmail.com> (raw)
In-Reply-To: <738aa4d6-9313-f484-0510-e965f2881869@c-s.fr>

Christophe,

On Sat, Apr 21, 2018 at 9:16 AM, christophe leroy
<christophe.leroy@c-s.fr> wrote:
>
>
> Le 20/04/2018 =C3=A0 22:08, Mathieu Malaterre a =C3=A9crit :
>>
>> On Fri, Apr 20, 2018 at 12:41 PM, Nicholas Piggin <npiggin@gmail.com>
>> wrote:
>>>
>>> On Fri, 20 Apr 2018 12:00:49 +0200
>>> Mathieu Malaterre <malat@debian.org> wrote:
>>>
>>>> On Fri, Apr 20, 2018 at 9:34 AM, Nicholas Piggin <npiggin@gmail.com>
>>>> 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 wh=
en
> 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=
)
--- /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 0x10=
000
-  NOTE           0x867640 0xc0857640 0x00857640 0x00024 0x00024     0x4
-  NOTE           0x867664 0xc0857664 0x00857664 0x0000c 0x0000c     0x1
+  LOAD           0x010000 0xc0000000 0x00000000 0x97ef34 0xadba68 RWE 0x10=
000
+  NOTE           0x87f640 0xc086f640 0x0086f640 0x00024 0x00024     0x4
+  NOTE           0x87f664 0xc086f664 0x0086f664 0x0000c 0x0000c     0x1

  Section to Segment mapping:
   Segment Sections...


> Christophe
>
>>
>> $ du -sk nick/vmlinux.with*
>> 124488 nick/vmlinux.with
>> 124004 nick/vmlinux.without
>>
>>
>>> Thanks,
>>> Nick
>
>
> ---
> L'absence de virus dans ce courrier =C3=A9lectronique a =C3=A9t=C3=A9 v=
=C3=A9rifi=C3=A9e par le
> logiciel antivirus Avast.
> https://www.avast.com/antivirus
>

  reply	other threads:[~2018-04-23 11:01 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-20  7:34 [PATCH 0/4] LD_DEAD_CODE_DATA_ELIMINATION fixes and enabling for powerpc Nicholas Piggin
2018-04-20  7:34 ` Nicholas Piggin
2018-04-20  7:34 ` [PATCH 1/4] kbuild: Fix asm-generic/vmlinux.lds.h for LD_DEAD_CODE_DATA_ELIMINATION Nicholas Piggin
2018-04-20  7:34   ` Nicholas Piggin
2018-04-20  7:34 ` [PATCH 2/4] kbuild: LD_DEAD_CODE_DATA_ELIMINATION no -ffunction-sections/-fdata-sections for module build Nicholas Piggin
2018-04-20  7:34   ` Nicholas Piggin
2018-04-20  7:34 ` [PATCH 3/4] kbuild: Allow LD_DEAD_CODE_DATA_ELIMINATION to be selectable if enabled Nicholas Piggin
2018-04-20  7:34   ` Nicholas Piggin
2018-04-20  7:34 ` [PATCH 4/4] powerpc: Allow LD_DEAD_CODE_DATA_ELIMINATION to be selected Nicholas Piggin
2018-04-20  7:34   ` Nicholas Piggin
2018-04-20 10:00   ` Mathieu Malaterre
2018-04-20 10:00     ` Mathieu Malaterre
2018-04-20 10:41     ` Nicholas Piggin
2018-04-20 10:41       ` Nicholas Piggin
2018-04-20 20:08       ` Mathieu Malaterre
2018-04-20 20:08         ` Mathieu Malaterre
2018-04-21  2:48         ` Nicholas Piggin
2018-04-21  2:48           ` Nicholas Piggin
2018-05-02  9:17           ` Mathieu Malaterre
2018-05-02  9:17             ` Mathieu Malaterre
2018-05-02 12:24             ` Nicholas Piggin
2018-05-02 12:24               ` Nicholas Piggin
2018-05-14 19:10               ` Mathieu Malaterre
2018-05-14 19:10                 ` Mathieu Malaterre
2018-04-21  7:16         ` christophe leroy
2018-04-21  7:16           ` christophe leroy
2018-04-23 11:01           ` Mathieu Malaterre [this message]
2018-04-23 11:01             ` Mathieu Malaterre
2018-04-23 11:01             ` Mathieu Malaterre
2018-05-07  0:46       ` Masahiro Yamada
2018-05-07  0:46         ` Masahiro Yamada
2018-05-07  9:53         ` Nicholas Piggin
2018-05-07  9:53           ` Nicholas Piggin
2018-04-20 10:01   ` Christophe LEROY
2018-04-20 10:01     ` Christophe LEROY
2018-04-20 10:36     ` Nicholas Piggin
2018-04-20 10:36       ` Nicholas Piggin
2018-04-20 13:21       ` Christophe LEROY
2018-04-20 13:21         ` Christophe LEROY
2018-04-20 10:39   ` Christophe LEROY
2018-04-20 10:39     ` Christophe LEROY
2018-04-20  9:59 ` [PATCH 0/4] LD_DEAD_CODE_DATA_ELIMINATION fixes and enabling for powerpc Mathieu Malaterre
2018-04-20  9:59   ` Mathieu Malaterre
2018-04-20 10:02 ` Christophe LEROY
2018-04-20 10:02   ` Christophe LEROY

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+7wUszDBFQRV78stj_MArnZYFp3ug6UoxH+Y__SWC=fGH2g8A@mail.gmail.com' \
    --to=malat@debian.org \
    --cc=christophe.leroy@c-s.fr \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=nico@fluxnic.net \
    --cc=npiggin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.