| |||
| Home > Linker command-line options > --veneer_inject_type=type | |||
This option controls the veneer layout when --largeregions mode
is on.
--veneer_inject_type=type
where is
one of:type
individualThe linker places veneers to ensure they can be reached by the largest amount of sections that use the veneer. Veneer reuse between execution regions is permitted. This type minimizes the number of veneers that are required but disrupts the structure of the image the most.
poolThe linker:
Collects veneers from a contiguous range of the execution region
Places all the veneers generated from that range into a pool.
Places that pool at the end of the range.
A large execution region might have more than one range and therefore more than one pool. Although this type has much less impact on the structure of image, it has fewer opportunities for reuse. This is because a range of code cannot reuse a veneer in another pool. The linker calculates the range based on the presence of branch instructions that the linker predicts might require veneers. A branch is predicted to require a veneer when either:
a state change is required
the distance from source to target plus a contingency greater than the branch range.
You can set the size of the contingency with the --veneer_pool_size= option. By
default the contingency size is set to 102400 bytes. The size--info=veneerpools option
provides information on how the linker has placed veneer pools.