You copied the Doc URL to your clipboard.

Methods of importing linker-defined symbols in C and C++

You can import linker-defined symbols into your C or C++ source code either by value or by reference.

Import by value

extern unsigned int symbol_name;

Import by reference

extern void *symbol_name;

If you declare a symbol as an int, then you must use the address-of operator (&) to obtain the correct value as shown in these examples:

Importing a linker-defined symbol
extern unsigned int Image$$ZI$$Limit;
config.heap_base = (unsigned int) &Image$$ZI$$Limit;
Importing symbols that define a ZI output section
extern unsigned int Image$$ZI$$Length;
extern char Image$$ZI$$Base[];
memset(Image$$ZI$$Base,0,(unsigned int)&Image$$Length);
Was this page helpful? Yes No