This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Linux binary size after strip


El miÃ, 22-11-2006 a las 08:42 -0800, H. J. Lu escribiÃ:
> On Wed, Nov 22, 2006 at 05:36:27PM +0100, Javier Cabezas RodrÃguez wrote:
> > El miÃ, 22-11-2006 a las 16:03 +0000, Nick Clifton escribiÃ:
> > > Hi Javier,
> > > 
> > > > Now I have stripped some of these sections, but the size of the binary
> > > > has not decreased. 
> > > 
> > > Possibly the sections have alignment requirements so that after 
> > > stripping they are still padded out to some fixed size ?
> > 
> > Each section has a 4096 alignment requirement, but they are 4096bytes
> > sized too, so it should not be a problem. I have attached the "readelf
> > -Sl" output of each kernel.
> > 
> > 1- Original kernel:       2396464 bytes
> > 2- Partitioned kernel: 2144924 bytes
> > 3- Stripped kernel:       2143660 bytes
> > 
> > > Possibly the kernel is already frugal with the symbols and debug 
> > > information it exports and there is nothing to strip.
> > 
> > The sections I want to strip only contain code (initially located in
> > the .text section). The debug sections are already stripped in standard
> > kernels.
> > 
> 
> Please send me the original kernel and the command you used to
> strip it.

Hi,

I have found that "du" gives the real size of the binary. I think it is
because all the emptied sections are replaced by zero-sized blocks. But,
couldn't them be deleted too? Will the loader copy this zero-sized
blocks into memory? It would be a problem, since we want to reduce the
size of the binary and its loading time.

Best regards.

Javi

-- 
Javier Cabezas RodrÃguez
Phd. Student - DAC (UPC)
jcabezas@ac.upc.edu

Attachment: signature.asc
Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmadadigitalmente


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]