This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

Re: increase in object code size



> On 80386, -fno-exceptions reduces size by about 25%.  "size -f" on
> SVR4 and similar systems will show the size by section; you should see
> an exception section (.eh_frame) about 30% as large as the code
> section.  This is present even in C code which doesn't use exceptions.

That much?  On sparc-sun-solaris2.5.1, size -A on a stripped cc1 from the
latest snapshot gives

section         size         addr
.interp           17        65748
.hash          19840        65768
.dynsym        39280        85608
.dynstr        40912       124888
.rela.got         12       165800
.rela.bss         36       165812
.rela.plt        612       165848
.text        1537124       166460
.init             28      1703584
.fini             20      1703612
.rodata       188754      1703632
.got              32      1957924
.dynamic         136      1957956
.plt             664      1958092
.data          21620      1958760
.ctors             8      1980380
.dtors             8      1980388
.eh_frame      72120      1980396
.bss           85524      2052520
.comment        6616            0
Total        2013363

.eh_frame is only 4.7% of .text here.  Is the bloat that much larger
for x86?  Why?

Another factor that may make some bloat more acceptable is if the
.eh_frame section is read only when exceptions are being thrown,
it never gets paged in when there aren't any exceptions (meaning
that the penalty is disk-only).


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