Kenwood HP 9000 Personal Computer User Manual


 
272 Chapter 8
Ways to Improve Performance
Linker Optimizations
subspaces. Merged subspaces can prevent the removal of dead
procedures. Therefore, it is optimal to have each procedure in its own
subspace.
Complete Executables
For complete executables, dead procedure elimination removes any
text subspaces that are not referenced from another subspace. Self
references, such as recursive procedures or subspaces with multiple
procedures that call each other, are not considered outside references
and are therefore candidates for removal.
If the address of a procedure is taken, the subspace within which it
resides is not removed. If a subspace is referenced in any way by a fixup
representing a reference other than a PC-relative call or an absolute call
it is not removed.
Incomplete Executables
For incomplete executables, dead procedure elimination works the
same as for complete executables except that no exported symbols or
their dependencies are removed. If an incomplete executable contains a
symbol that is to be referenced by a shared library and is not exported, it
is removed if the other conditions discussed above hold.
Shared Libraries
In shared libraries only symbols that are not referenced and not exported
are removed. In shared libraries all symbols that are not of local scope
are exported. Therefore only locally scoped symbols not referenced are
removed.
Relocatable Objects
When performing a relocatable link with the -r option, dead procedure
elimination is disabled since the only possible gain would be the removal
of unreferenced local procedures. Objects resulting from a relocatable
link are subject to dead procedure elimination upon a final link.
Affects on Symbolic Debugging
Any procedure that has symbolic debug information associated with it is
not removed. Procedures that do not have symbolic debug information
associated with them but are included in a debug link are removed if
they are not referenced.