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


>>>>> 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


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