What is 'Linker created' and 'Lc','Gb','Wk' in the .map file?

Technical Note 81528

Architectures:

ARM, RiscV, RH850, RL78, RX, SH, STM8

Component:

linker

Updated:

2020/8/31 12:40

Introduction

This Technical Note applies to:

IAR Embedded Workbench
ARM 
SH 
STM8 
RH850  
RX
RL78
RiscV

Versions      
5.10 and later            
2.10 and later
1.10 and later
1.10 and later            
2.10 and later   
2.10 and later
1.10 and later                  

1. What is 'Linker created' ?

Answer

These are the extra allocations done by the IAR ILINK Linker.

Example

This is a extract from an example linker file:

  Module           ro code    ro data    rw data
  ------           -------    -------    -------
...
...
  Linker created       140        123      2 980
 -----------------------------------------------
  Grand Total:      76 888      3 800      5 716

Explanation

The 3 different headings correspond to these addtions made by the IAR ILINK Linker:

Kind of section Section type Explanation
ro code Veneer These are "helpers" used in order to achive jumps in the whole address area, i.e. longer than +-4 MB / +-32 MB (Thumb/Arm mode).
ro data .iar.init_table The table which is used during start-up to control the initialization.
ro data Initializer bytes If any symbols placed in RAM are to be initialized manually, then "Initializer bytes' are created by the linker.
rw data
ro data
uninit

If the define block directive is combined with the parameter size in the .icf file, this will order the linker to create a block of the specified size. So when linking, each such block will be filled by the linker.

The linker directive for a block that holds a stack must use the size parameter. The whole block is marked uninit, (as a stack is an empty when it comes to linking).

A block that is not a stack (and marked with the size parameter) can more or less filled with defined variables in the block. All unused bytes in the block become marked with "uninit".

rw data .iar.dynexit

Holds the table of calls to be made at exit.

   

 

2. What is 'Lc','Gb','Wk' ?

Answer

There are four variants of properties defined in the ELF that may appear in this column:

  • Lc = local.
  • Gb = global.
  • Wk = weak.
  • ?? = unknown.

Example

Extracts from example linker files:

Undefined_Handler     0x00000274          Code   Wk   vectortrap.o [4]

Region$$Table$$Base   0x08002d2c          --     Gb   - Linker created -
Region$$Table$$Limit  0x08002d50          --     Gb   - Linker created -

SysTick_Config        0x08002667   0x32   Code   Lc   main.o [1]

All product names are trademarks or registered trademarks of their respective owners.

很抱歉,该页面尚未翻译成中文。

如果您有任何问题,请联系我们的中国团队

We do no longer support Internet Explorer. To get the best experience of iar.com, we recommend upgrading to a modern browser such as Chrome or Edge.