|Home > Optimization Techniques > Optimizing across modules with link time optimization > Restrictions with link time optimization|
Link time optimization has a few restrictions in Arm® Compiler 6. Future releases might have fewer restrictions and more features. The user interface to link time optimization might change in future releases.
armlink only supports
bitcode objects on the command line. It does not support bitcode objects
coming from libraries.
armlink gives an
error message if it encounters a file containing bitcode while loading
from a library.
Although armar silently accepts ELF files that are produced with armclang -flto, these files currently do not have a proper symbol table. Therefore, the generated archive has incorrect index information and armlink cannot find any symbols in this archive.
--partialonly works with ELF files. The linker gives an error message if it detects a file containing bitcode.
The output of the link time optimizer is a single ELF object file that by default is given a temporary filename. This ELF object file contains sections and symbols just like any other ELF object file, and these are matched by input section selectors as normal.
--lto_intermediate_filename to name
the ELF object file output. You can reference this ELF file name in the
.ANY(+RO)used to select sections generated by link time optimization.
It is not possible to match bitcode in
.llvmbc sections by name in a
armclangexecutable and the
libLTOlibrary must come from the same Arm Compiler 6 installation. Any use of
libLTOother than that supplied with Arm Compiler 6 is unsupported.
--fpuwhen link time optimization is enabled, armlink can incorrectly report that the attributes in the file produced by the link time optimizer are incompatible with the provided attributes.
armclang -mexecute-onlyoption. If you use the
-Omaxoptions, then the compiler cannot generate execute-only code and produces a warning.