Re: The case of LTO when produced enlarged binaries

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

 



On Sun, 2020-08-30 at 14:42 +0200, Igor Raits wrote:
> On Sun, 2020-08-30 at 12:37 +0100, Tomasz Kłoczko wrote:
> > On Fri, 24 Jul 2020 at 21:31, Igor Raits <
> > ignatenkobrain@xxxxxxxxxxxxxxxxx>
> > wrote:
> > [..]
> > 
> > > Well, I tell what I see :)
> > > 
> > > Compiling kitty with settings below produces this big
> > > /usr/lib64/kitty/kitty/fast_data_types.so:
> > > 
> > > * Without any LTO-related flags: 4.52 MB
> > > * With -flto: 4.30 MB
> > > * With -flto -ffat-lto-objects: 4.79 MB
> > > 
> > > Well, I did not run compilation multiple times but don't think it
> > > will
> > > change much.
> > > 
> > 
> > Comparing the size of the executable files does not make any sense.
> > You should use the "size" command.
> 
> Well, I'd use `size` command if I would care what section of a file
> takes what size. In this case, I don't really care which section it is.
> 
> All I care is that with -ffat-lto-objects, binary becomes bigger.
Given this isn't a correctness issue, I haven't prioritized it.

A quick look tells me all the difference is in the symbol table -- ie, the code,
data and bss sections are the same size, but the symbol table is significantly
larger.  And AFAICT it's all debug symbols.

In fact, it doesn't look like the debug info was stripped at all:

[law@localhost kitty]$ objdump -h fast_data_types.so

fast_data_types.so:     file format elf64-x86-64
[ ... ]
 26 .debug_aranges 000001e0  0000000000000000  0000000000000000  000e2b64  2**0
                  CONTENTS, READONLY, DEBUGGING, OCTETS
 27 .debug_info   000e60c7  0000000000000000  0000000000000000  000e2d44  2**0
                  CONTENTS, READONLY, DEBUGGING, OCTETS
 28 .debug_abbrev 00007543  0000000000000000  0000000000000000  001c8e0b  2**0
                  CONTENTS, READONLY, DEBUGGING, OCTETS
 29 .debug_line   0007644f  0000000000000000  0000000000000000  001d034e  2**0
                  CONTENTS, READONLY, DEBUGGING, OCTETS
 30 .debug_str    0005cab8  0000000000000000  0000000000000000  0024679d  2**0
                  CONTENTS, READONLY, DEBUGGING, OCTETS
 31 .debug_loc    000d6477  0000000000000000  0000000000000000  002a3255  2**0
                  CONTENTS, READONLY, DEBUGGING, OCTETS
 32 .debug_ranges 0003a000  0000000000000000  0000000000000000  003796cc  2**0
                  CONTENTS, READONLY, DEBUGGING, OCTETS
 33 .debug_macro  0002b64f  0000000000000000  0000000000000000  003b36cc  2**0
                  CONTENTS, READONLY, DEBUGGING, OCTETS


So someone needs to figure out why debug symbols aren't being stripped.  I
manually stripped the bits in kitty and after doing so the sizes of the resultant
DSOs are the same (as I'd expect them to be) across the two builds.

jeff
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux