SPNU151W January 1998 – 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
The linker looks for run-time-support libraries primarily through the TI_ARM_C_DIR environment variable. Typically, one of the pathnames in TI_ARM_C_DIR is your install directory/lib, which contains all of the pre-built libraries, as well as the index library libc.a. The linker looks in TI_ARM_C_DIR to find a library that is the best match for the build attributes of the application. The build attributes are set indirectly according to the command-line options used to build the application. Build attributes include things like CPU revision. If the library name is explicitly specified (e.g. -library=rtsv4_A_be_eabi), run-time support looks for that library exactly. If the library name is not specified, the linker uses the index library libc.a to pick an appropriate library. If the library is specified by path (e.g. –library=/foo/rtsv4_A_be_eabi), it is assumed the library already exists and it will not be built automatically.
The index library describes a set of libraries with different build attributes. The linker will compare the build attributes for each potential library with the build attributes of the application and will pick the best fit. For details on the index library, see the archiver chapter in the ARM Assembly Language Tools User's Guide.
Now that the linker has decided which library to use, it checks whether the run-time-support library is present in TI_ARM_C_DIR. The library must be in exactly the same directory as the index library libc.a. If the library is not present, the linker invokes mklib to build it. This happens when the library is missing, regardless of whether the user specified the name of the library directly or allowed the linker to pick the best library from the index library.
The mklib program builds the requested library and places it in 'lib' directory part of TI_ARM_C_DIR in the same directory as the index library, so it is available for subsequent compilations.
Things to watch out for: