This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: increase in object code size
- To: jbuck at synopsys dot com (Joe Buck), egcs at cygnus dot com
- Subject: Re: increase in object code size
- From: Jason Merrill <jason at cygnus dot com>
- Date: 23 Sep 1997 10:33:45 -0700
- References: <199709231703.NAA17808@no-knife.MIT.EDU><199709231716.KAA13154.cygnus.egcs@atrus.synopsys.com>
>>>>> Joe Buck <jbuck@synopsys.com> writes:
>> > You might check to see whether -fno-exceptions has an effect.
>>
>> 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.
This bloat can be significantly reduced by potential optimizations in the
assembler. Currently, adjusting the effective PC takes 5 bytes. This can
be reduced to 1 byte in most cases, but the compiler makes pessimistic
assumptions because it doesn't know the size of instructions.
The assembler and linker can also do a lot of commonization; most function
prologues look the same, so repeated sequences can be factored out into the
CIE, and identical CIEs can be shared between translation units. This
would leave an overhead of 16 bytes per function.
This just needs someone to do the BFD work.
Jason