10.11. Linking C/C++ Code

The C/C++ compiler produces assembly language source code that can be assembled and linked. For example, a C program consisting of modules prog1, prog2, etc., can be assembled and then linked to produce an executable file called prog.out:

tiarmclang -Wl,--rom_model,--output_file=prog.out prog1.c.o prog2.c.o ...

The --rom_model option tells the linker to use special conventions that are defined by the C/C++ environment.

The archive libraries shipped by TI contain C/C++ run-time-support functions and are brought it automatically.

C, C++, and mixed C and C++ programs can use the same run-time-support library. Run-time-support functions and variables that can be called and referenced from both C and C++ will have the same linkage.

For more information about the Arm C/C++ language, including the run-time environment and run-time-support functions, see C/C++ Language Implementation.

Contents: