Computers are increasingly being incorporated in devices with a limited amo
unt of available memory. As a result research is increasingly focusing on t
he automated reduction of program size. Existing literature focuses on eith
er data or code compaction or on highly language dependent techniques. This
paper shows how combined code and data compaction can be achieved using a
link-time code compaction system that reasons about the use of both code an
d data addresses. The analyses proposed rely only on fundamental properties
of linked code and are therefore generally applicable. The combined code a
nd data compaction is implemented in SQEEZE, a link-time program compaction
system, and evaluated on SPEC2000, MediaBench and C++ programs, resulting
in total binary program size reductions of 23.6%-46.6%. This compaction inv
olves no speed tradeoff, as the compacted programs are on average about 8%
faster.