Discussion:
useless code is required (huge executables)
(too old to reply)
Olivier Carrel
2005-07-06 15:35:34 UTC
Permalink
Hi,
Executables that I create with visualage C++ 6.0 on AIX are huge (compared
to those obtained with other compilers on other platforms. The comparison is
rather awkward, but they are, for instance, 10 times smaller with aCC on
HP-UX). The linker seems not to remove useless code coming from unused *.o
so that objects or functions used in these *.o are then required. It results
in undefined symbols if they are not included. Code is organized in static
and shared libraries so each project normally includes necessary libraries
and removes unnecessay codes. The problem appeared when migrating from
ibmcxx 3.6.6 to visualage some years ago and no solution has been given so
far. Have I missed something and do XL C++ 7.0 has addressed this problem?

Olivier Carrel
Gangadhar NPK
2005-12-19 09:54:57 UTC
Permalink
IBM's linker has been this way for a long time. It requires all the
dependent libs to be included in the link line, and apparently it
doesn't do dead code / unused code removal. I am not aware of xlC 7.0
though.
hth
Post by Olivier Carrel
Hi,
Executables that I create with visualage C++ 6.0 on AIX are huge (compared
to those obtained with other compilers on other platforms. The comparison is
rather awkward, but they are, for instance, 10 times smaller with aCC on
HP-UX). The linker seems not to remove useless code coming from unused *.o
so that objects or functions used in these *.o are then required. It results
in undefined symbols if they are not included. Code is organized in static
and shared libraries so each project normally includes necessary libraries
and removes unnecessay codes. The problem appeared when migrating from
ibmcxx 3.6.6 to visualage some years ago and no solution has been given so
far. Have I missed something and do XL C++ 7.0 has addressed this problem?
Olivier Carrel
Loading...