LTO performs aggressive optimizations by analyzing the dependencies between bitcode format objects. Such aggressive optimizations can result in the removal of unused variables and functions in the source code.
Note:
When you specify the -flto
option, armclang produces ELF files that
contain bitcode in a .llvmbc section.
With the --no_lto option, armlink gives an error message if it encounters any
.llvmbc sections.
Default
The default is --no_lto.
Dependencies
Link-time
optimization requires the dependent library libLTO.
Table
C1-4 Link-time
optimization dependencies
Dependency
Windows filename
Linux filename
libLTO
LTO.dll
libLTO.so
By default, the dependent library libLTO is present in the same directory as armlink.
The search order for these dependencies is as follows.
LTO.dll:
The same directory as the armlink executable.
The directories in the current directory search path.
libLTO.so:
The same directory as the armlink executable.
The directories in the LD_LIBRARY_PATH
environment variable.
The cache file /etc/ld.so.cache.
The directories /lib and
/usr/lib.
These directories might have the suffix 64 on some 64-bit Linux systems. For example,
on 64-bit Red Hat Enterprise Linux the directories are /lib64 and /usr/lib64.
Note:
The armclang executables and the libLTO library must come from the same Arm® Compiler installation. Any use of libLTO other than that supplied with Arm Compiler is unsupported.
Note:
LTO does not honor the armclang -mexecute-only option. If you use the armclang -flto or -Omax options, then the compiler cannot generate execute-only code.
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.