SPNU118Z September 1995 – March 2023 66AK2E05 , 66AK2H06 , 66AK2H12 , 66AK2H14 , AM1705 , AM1707 , AM1802 , AM1806 , AM1808 , AM1810 , AM5K2E04 , OMAP-L132 , OMAP-L137 , OMAP-L138 , SM470R1B1M-HT , TMS470R1A288 , TMS470R1A384 , TMS470R1A64 , TMS470R1B1M , TMS470R1B512 , TMS470R1B768
Consider these object file libraries that all have the same members, but are built with different build options:
Object File Library Name | Build Options |
---|---|
mylib_ARMv4_be.lib | --code_state=32 --silicon_version=4 --endian=big |
mylib_ARMv4_le.lib | --code_state=32 --silicon_version=4 --endian=little |
mylib_THUMBv4_be.lib | --code_state=16 --silicon_version=4 --endian=big |
mylib_THUMBv4_le.lib | --code_state=16 --silicon_version=4 --endian=little |
mylib_THUMBv7A8_le.lib | --code_state=16 --silicon_version=7A8 --endian=little |
Using the library information archiver, you can create an index library called mylib.lib from the above libraries:
armlibinfo --output mylib.lib mylib_ARMv4_be.lib mylib_THUMBv4_be.lib
mylib_THUMBv7A8_le.lib mylib_ARMv4_le.lib mylib_THUMBv4_le.lib
You can now specify mylib.lib as a library for the linker of an application. The linker uses the index library to choose the appropriate version of the library to use. If the --issue_remarks option is specified before the --run_linker option, the linker reports which library was chosen.
armcl-mv7A8 -me --mylib_pruv3_be main.c -z -l lnk.cmd ./mylib.lib
<Linking>
remark: linking in "mylib_THUMBv7A8_le.lib" in place of "mylib.lib"
armcl -mv5e --issue_remarks main.c -z -l lnk.cmd ./mylib.lib
<Linking>
remark: linking in "mylib_ARMv4_be.lib" in place of "mylib.lib"
In Example 2, there was no version of the library for ISAv5, but an ISAv4 library was available and is compatible, so it was used.