linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	linux-kernel@vger.kernel.org,  linux-s390@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org, x86@kernel.org,
	 keescook@chromium.org, akpm@linux-foundation.org,
	mingo@kernel.org, hpa@zytor.com, heiko.carstens@de.ibm.com,
	benh@kernel.crashing.org, mmarek@suse.cz, rusty@rustcorp.com.au
Subject: Re: [PATCH 2/4] powerpc: enable text relative kallsyms for ppc64
Date: Thu, 21 Jan 2016 15:01:12 +1100	[thread overview]
Message-ID: <1453348872.468.6.camel@ellerman.id.au> (raw)
In-Reply-To: <1453280738-18721-3-git-send-email-ard.biesheuvel@linaro.org>

On Wed, 2016-01-20 at 10:05 +0100, Ard Biesheuvel wrote:

> This enables the newly introduced text-relative kallsyms support when
> building 64-bit targets. This cuts the size of the kallsyms address
> table in half, and drastically reduces the size of the PIE dynamic
> relocation section when building with CONFIG_RELOCATABLE=y (by about
> 3 MB for ppc64_defconfig)
> 
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
> 
> Results for ppc64_defconfig:
> 
> BEFORE:
> =======
> $ size vmlinux
>    text	   data	    bss	    dec	    hex	filename
> 19827996	2008456	 849612	22686064	15a2970	vmlinux
> 
> $ readelf -S .tmp_kallsyms2.o
> There are 9 section headers, starting at offset 0x4513f8:
> 
> Section Headers:
>   [Nr] Name              Type             Address           Offset
>        Size              EntSize          Flags  Link  Info  Align
>   ...
>   [ 4] .rodata           PROGBITS         0000000000000000  00000100
>        00000000001fcf00  0000000000000000   A       0     0     256
>   [ 5] .rela.rodata      RELA             0000000000000000  001fd1d8
>        0000000000254220  0000000000000018   I       7     4     8
>   [ 6] .shstrtab         STRTAB           0000000000000000  001fd000
>        0000000000000039  0000000000000000           0     0     1
>   ...
> 
> $ ls -l arch/powerpc/boot/zImage
> -rwxrwxr-x 2 ard ard 7533160 Jan 20 08:43 arch/powerpc/boot/zImage
> 
> AFTER:
> ======
> $ size vmlinux
>    text	   data	    bss	    dec	    hex	filename
> 16979516	2009992	 849612	19839120	12eb890	vmlinux
> 
> $ readelf -S .tmp_kallsyms2.o
> There are 8 section headers, starting at offset 0x199bb0:
> 
> Section Headers:
>   [Nr] Name              Type             Address           Offset
>        Size              EntSize          Flags  Link  Info  Align
>   ...
>   [ 4] .rodata           PROGBITS         0000000000000000  00000100
>        0000000000199900  0000000000000000   A       0     0     256
>   [ 5] .shstrtab         STRTAB           0000000000000000  00199a00
>        0000000000000034  0000000000000000           0     0     1
>   ...
> 
> $ ls -l arch/powerpc/boot/zImage
> -rwxrwxr-x 2 ard ard 6985672 Jan 20 08:45 arch/powerpc/boot/zImage


Nice space saving, thanks very much.

I've booted this on a bunch of machines and it seems to be working fine.

Tested-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)

cheers

  reply	other threads:[~2016-01-21  4:01 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-20  9:05 [PATCH 0/4] support for text-relative kallsyms table Ard Biesheuvel
2016-01-20  9:05 ` [PATCH 1/4] kallsyms: add support for relative offsets in kallsyms address table Ard Biesheuvel
2016-01-20 19:13   ` Kees Cook
2016-01-20  9:05 ` [PATCH 2/4] powerpc: enable text relative kallsyms for ppc64 Ard Biesheuvel
2016-01-21  4:01   ` Michael Ellerman [this message]
2016-01-20  9:05 ` [PATCH 3/4] s390: enable text relative kallsyms for 64-bit targets Ard Biesheuvel
2016-01-20  9:43   ` Heiko Carstens
2016-01-20 10:04     ` Ard Biesheuvel
2016-01-20 10:17       ` Heiko Carstens
2016-01-20 10:18         ` Ard Biesheuvel
2016-01-20  9:05 ` [PATCH 4/4] x86_64: " Ard Biesheuvel
2016-01-20 19:12   ` Kees Cook
2016-01-20 10:33 ` [PATCH 0/4] support for text-relative kallsyms table Ingo Molnar
2016-01-20 11:50   ` Arnd Bergmann
2016-01-21  5:10 ` Rusty Russell
2016-01-21  6:45   ` Ard Biesheuvel
2016-01-21  8:32     ` Ard Biesheuvel
2016-01-27  3:46       ` Rusty Russell

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=1453348872.468.6.camel@ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=akpm@linux-foundation.org \
    --cc=ard.biesheuvel@linaro.org \
    --cc=benh@kernel.crashing.org \
    --cc=heiko.carstens@de.ibm.com \
    --cc=hpa@zytor.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mingo@kernel.org \
    --cc=mmarek@suse.cz \
    --cc=rusty@rustcorp.com.au \
    --cc=x86@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).