bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How create small binaries with GNU binutils.


From: Andreas Schwab
Subject: Re: How create small binaries with GNU binutils.
Date: Fri, 01 Feb 2019 17:49:09 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.91 (gnu/linux)

On Feb 01 2019, Dmitry Bogatov <address@hidden> wrote:

> results in huge binary:
>
>       $ du -hb a.out
>       4744    a.out
>       $ strip -s a.out
>       $ du -hb a.out
>       4408    a.out
>       $ file a.out
>       a.out: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically 
> linked, stripped

I cannot reproduce that.

$ stat -c %s a.out
664
$ strip a.out
$ stat -c %s a.out
344
$ size a.out 
   text    data     bss     dec     hex filename
     13       0       0      13       d a.out
$ rpm -q binutils
binutils-2.31.90-lp150.5.68.1.x86_64

Try examining the files with `readelf -a'.

Andreas.

-- 
Andreas Schwab, address@hidden
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]