Link-Time Optimizations
Ian Lance Taylor
ian@airs.com
Tue Nov 8 14:52:00 GMT 2005
Javier Cabezas Rodríguez <javier.cabezas@gmail.com> writes:
> I haven't found a documented example of "Linker Relaxation", but I
> think that we aren't speaking about the same kind of optimizations.
> Diablo can do:
>
> - Dead Code and Data elimination, achieving up to 25% code size reduction.
>
> - Whole program constant propagation.
>
> - Branch elimination.
>
> - Liveness analysis.
>
> - Code factoring.
>
> - Code obfuscation
>
> - Code compression
>
> - ... and much more.
>
> At the moment it only allows this for statically linked programs, but
> support for dynamically linked programs is planned.
In the GNU toolchain the current general idea is to do these things in
the compiler. See gcc's -combine option. This does have some
drawbacks; in particular, the compiler in general won't see the whole
program at once. And the compiler is never going to do code
obfuscation or code compression.
There are no plans that I know of to add any of this functionality to
the GNU linker.
Ian
More information about the Binutils
mailing list