Keil Logo

Compared with C

TGROUPS at the L166 Linker level are similar to blocks at the C-source level. That is, TGROUPS provide a block structure for PUBLIC symbols, sections, and groups on the linker/locator level. For example:

C Program L166 Linker Command Line
func1 () {
  int i;
  for (i = 1; i < 100; i++);
}

main () {
  int i;
  for (i = 1; i < 100; i++) func ();
}
L166 { file1.obj }, { file2.obj }
In this C program, the variable i in func has a different location than the variable i in main. The scope of automatic variables is limited to the function containing the variable definition. In this linker command line we assume that file1.obj and file2.obj each has a PUBLIC symbol named i. Specifying each module in a separate TGROUP isolates the PUBLIC symbols from each other. That is, the PUBLIC symbol i from file1.obj cannot be accessed from file2.obj and vice-versa. The scope of PUBLIC symbols, sections, and groups is limited to the TGROUP containing the definitions.
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

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.