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

Re: [MiNT] Linking with multilib feature



Patrice Mandin wrote:

Just out of curiosity, why do you still use 3.3 version?

Because gcc 4.3 generates much bigger binaries, wonder where it comes
from, or if the binutils 2.18 ld is faulty. If you use 4.3, did you
noticed that also?

binutils 2.18 (and not yet released 2.19) are clean, absolutely no unnecessary byte is added by ld.

While making the tests, be sure to use the same MiNTLib version. A single function call added in a .o or its dependencies can lead to a big size increase. Be sure the other libraries are the same, especially the libm (fdlibm or PML).

Of course, before comparing the sizes, compile them with -O2 (or better) and strip them.

However, early versions of GCC 4.x were known to produce worse code than GCC 3.x in certain cases (I don't know if it is still the case). GCC 4.x tries to inline a lot of stuff, as well as unrolling the loops. I personally found a case where -O3 produced code bigger and less efficient than with -O2.

GCC 4.x should generate clean and compact code. If it is not the case, we have to find why !

--
Vincent Rivière