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
Incomplete Executables
For incomplete executables, dead procedure elimination works in the same way 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.
Retain Unreferenced Symbols with +noprocelim_sym
The +Oprocelim option in linker enables optimization by removing all unreferenced procedure symbols and data symbols. The +noprocelim_sym option enables you to retain certain unreferenced symbols. For each symbol that you want to retain, you can use +Oprocelim in combination with +noprocelim_sym.
For example,
ld +Oprocelim +noprocelim_sym xproc +noprocelim_sym xdata x.o
This link command enables procedure elimination optimization while linking an executable, and it identifies two symbols that should not be eliminated: xproc and xdata.
Relocatable Objects
When performing a relocatable link with the
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.
In
General Information about PBO
204 Improving Your Application Performance