- Important information
- New features
- Known problems
- Program corrections
- User guide corrections
- Miscellaneous
- Release history
Important information
-
The 5.20 toolset has new features to make it possible to copy all (or most) of the code to RAM at program startup. One of these features is that the linker protects sections that are referenced from the startup code from being affected by an 'initialize by copy' directive, ensuring that only code that is only run after copy initialization has been finished will be copied to RAM.
In some cases, this can mean that an old project no longer works when linked with the new linker and libraries. One example is if you are supplying your own replacement for the cstartup module, based on the module in one of the 5.1X releases, and you are specifying in your 'initialize by copy' directive that you want the interrupt table to be copied to RAM at program startup.
To correct this you must mark the interrupt table with a special symbol,__iar_init$$done
, to indicate that copy initialization is performed before it is needed. Otherwise the linker will not arrange for the interrupt table to be copied, even though it is mentioned in an 'initialize by copy' directive. For Cortex-M processors, you only have to do this if you are also supplying your own cmain module.Atmel examples are in many cases written in the way described above. The fix is to place a label
__iar_init$$done
in front of the vector table.
Example:SECTION .intvec:CODE:NOROOT(2) ARM __iar_init$$done: ; The vector table is not needed ; until after copy initialization is done __vector: LDR PC,Reset_Addr ; Reset : :
-
In the kickstart edition, the linker will choose the basic heap implementation, that is, the same as when the linker command line option
--basic_heap
is used in the standard edition. -
If an application is written purely in assembler language, and the runtime library is not used, the linker file must contain a
do not initialize
directive for each section that containsreadwrite
data. For example, this assembler code
implies that the following directive must be present in the linker file:SECTION variables_section:DATA(2) DATA var1: DS32 1 var2: DS8 64
If the linker directive is omitted, the linker will assume thatdo not initialize { readwrite section variables_section };
variables_section
contains data which shall be initialized with zero, and will issueError[Lp001]: no definition for init routine "__iar_zero_init3"
as the runtime library is not used.
New features
- None.
Known Problems
-
Building with
cstartup.s
will cause the MISRA C checker to report errors incorrectly.
[EW19800] -
The
==
and!=
operators in linker configuration files produce incorrect results.
[EW22755] -
Unclosed quoted strings in the linker config file causes the linker to hang.
[EW22908]
Program Corrections
-
Assembler files with incorrect mode annotations -
DATA
,CODE16
, etc - no longer causes an internal error in the linker.
[EW22464] -
Using the
place at end
linker directive with a block that has an alignment larger than its size no longer results in an internal error.
[EW22620] -
In EWARM 6.30.3:
The linker will no longer inline symbols used by the debugger:__iar_semihosting
,__iar_return_from_swi
,__iar_sh_stdout_swo
.
[EW22789] -
In EWARM 6.30.3:
Linking a project with overlapping absolute sections (for instance from different SFRs at the same address), no longer results in one or more spurious errorLp015
(committed sections too large to fit) messages.
[EW22798] -
In EWARM 6.30.3:
The heap in use is now the advanced version,dlmalloc
, provided that the application refers to the heap (not counting references from library functions) and that the option--basic_heap
is not used.
[EW22800] -
In EWARM 6.30.3:
Absolute sections (and the symbols defined in them) could be assigned incorrect addresses by the linker. In the typical case, this would not affect the code, as references from code typically use the address directly, but it would affect the map file and the debugger. This problem has been corrected.
[EW22836] -
In EWARM 6.30.3:
Providing stack usage information in a stack usage control file for a function that is present when linking, but not included in the final program, no longer causes a crash.
[EW22846] -
In EWARM 6.30.5:
Using theoverride
keyword in a stack usage control file to override the stack usage information provided in an object file no longer causes an internal error in the linker.
[EW22874] -
In EWARM 6.30.5:
Incorrect region calculations involving ranges wrapping around address zero could lead to spurious emission of errorLp022
(absolute placement overlaps with previous absolute placement) and other problems. This has been corrected.
[EW22941]
User guide corrections
- None.
Miscellaneous
-
Special runtime library for Cortex-R4
When building for Cortex-R4, libraries for architecture 5E are picked automatically by the linker. There is however one special library needed for 7R, to utilize harware division. The name of this library is div7R_t.a, that is one for little endian and one for big endian.
Release history
V6.21 2011-07-05
Program corrections- None.
- None.
V6.20 2011-04-29
Program corrections-
Using the
place at end of
directive with content that includes a high-alignment section or block no longer causes an internal error.
[EW22255] -
Using
--strip
withielftool
did not remove all debug info related ELF sections, such as string tables. Now these are also removed.
[EW22372]
- None.
V6.10 2010-11-04
Program corrections-
The linker could crash with an internal error after issuing error Lp017 (compressed initializers needed an address that could not be determined until the size of compressed initializers is known).
[EW21191] -
In some circumstances a
place at
directive with no needed content and a memory range partially overlapping other section placement directives could cause an internal error.
[EW21572] -
If the sections/blocks in
place at
directives did not fit in the specified ranges, the diagnostic message produced was nonsensical. Example:
Error[Lp011]: section placement failed: unable to allocate space for sections/blocks with a total estimated minimum size of 0x0 bytes in <> (total uncommitted space 0xffffffffffff372c). Needed:
[EW21849] -
C-SPY could emit a spurious "ROM size limit exceeded" error when loading Release build output from a product with a ROM size limit where some ROM usage is not counted against the limit.
[EW21909] -
ielftool
now uses segment data instead of section data when executing the fill and checksum functions.
[EW22329] -
Iarchive now returns a proper exit status when using the silent option.
[EW21944]
- None.
V5.50 2010-04-21
Program corrections-
Needed module-local absolute symbols were not kept by the linker, and no space was reserved for them.
Example:
static __no_init int array[10] @ 0x100;
[EW21528] -
Section placement could fail when several
place at
commands were used in such a fashion that overlap could occur if veneers were needed.
[EW21647] -
Expanding an ELF section that did not end on an even 4-byte boundary could lead to an error.
[EW21654] -
In EWARM 5.50.5:
A sequence ofplace at
section placement directives into the same memory region, where one contained compressed initializers, and a later one consisted only of blocks with no content, no longer results in an internal error in the linker.
[EW21746] -
In EWARM 5.50.5:
Starting withilinkarm
5.50.0, the linker always generated an init table section. In builds where an init table is not needed, this unnecessarily required the configuration file to contain a section placement pattern that matched the init table section. The init table section is no longer generated when it is not needed.
[EW21761]
- None.
V5.41 2009-12-14
Program corrections-
Linking no longer fails with error Lp020 (compressed initializers too large to fit) in cases involving initialization by copy of a block of code needing veneers, where some of the code sections had a smaller alignment than the veneers.
[EW21183] -
In EWARM 5.41.2:
Aplace in
directive in a range straddling the start/end of the range of aplace at
directive no longer causes the linker to terminate with an internal error.
[EW21488] -
In EWARM 5.41.2:
In assembly code,pc
-relative instructions (like branches) referring to an absolute address no longer incorrectly results in undefined symbol errors when linking.
[EW21525]
- None.
V5.40 2009-07-10
Program corrections-
Section placement could fail with an internal error
[range allocation inconsistency]
when the needed range for aplace at
command partially overlapped aplace in
command with a larger start address.
[EW20817] -
When using compressed initializers with the compression algorithms packbits, lzw, or bwt, the linker cannot handle placing the destination of the initializers at an address that is dependent on the size of the initializers. Doing this resulted in an internal error but now instead results in the new error
Lp021
.
[EW20842] -
Including the
locale.h
file would force linkage with the full DLIB (including locale support). This has been corrected to only occur if locale support is actually requested.
[EW20850] -
ielftool
no longer crashes when using an ELF file without a symbol table as input.
[EW20883] -
In some circumstances
place at
directives could cause linking to fail with errorLp011 (section placement failed)
.
[EW20901] -
When building initialization tables in link jobs with multiple zero or copy areas not inside blocks, an internal calculation error in the linker could cause section placement to fail with error
Lp011
.
[EW20968, 20986] -
The compiler emits debug information for an enumeration type if any of its constants are used, even if the type itself is not used. For unnamed enumeration types these constants were not visible in the debugger. Now they are.
[EW21053] -
Placing the linker-generated init table using an 'at end' placement could result in an internal error in the linker.
[EW21065] -
In EWARM 5.40.4:
The linker has been changed to assume that the automatically chosen libraries are consistent with the command line options.
[EW21201] -
In EWARM 5.40.4:
ielftool
now generates correct output when the input ELF file contains a segment with more than one section.
[EW21194,EW21196,EW21286]
- None.
V5.30 2009-01-23
Program corrections
-
In EWARM 5.30.2:
Linking an application with compressed initializers inside a block whose end was referenced (using __section_end or a $$Limit symbol) caused an array bounds violation in Ilink, which could result in an internal error or worse.
[EW20796] -
Linking an object file with a section consisting entirely of zero-size fragments caused an internal error in the linker.
[EW19873] -
When linking files where a placement was empty but had an alignment requirement, The linker could terminate with an internal error (
ApplyState - No allocation change
).
[EW20353] -
Section placement could earlier fail for very small sections in some cases. Typically, this could happen when functions and variables were placed in the same memory area, and there were many calls that were close to the limit of their reach. This caused great uncertainty about how many veneers that were needed.
[EW20464] -
After emitting the appropriate error message, the linker could terminate with an internal error if some sections in the program did not match any placement directive.
[EW20481] -
The linker could earlier terminate with an internal error if the configuration included a
place in
directive and aplace at
directive with the same start address, and the contents of theplace at
directive occupied zero bytes.
[EW20656] -
Compatibility checking for functions in translation units compiled without --interwork and containing a mixture of static and public functions was earlier broken in the linker, which could result in spurious compatibility errors (Lt020) as well as a failure to report such problems when they should be reported.
[EW20745]
-
Compressed initializers
The linker can compress initialized data to minimize flash use. The compressed data will be atomatically uncompressed when moved from flash to RAM by the startup code.
V5.20 2008-06-24
Program corrections
-
Using the
export
directive to export an unknown symbol from a linker configuration file no longer causesilinkarm
to terminate with an internal error after reporting the problem.
[EW19729] -
ielftool
can now calculate a sum32 checksum on ELF sections that have a length that is not a multiple of 4.
[EW19817] -
ielftool
can now perform a fill operation on ELF files that contain sections with a length that is not a multiple of 4.
[EW19835] -
ilinkarm
no longer fails to emit some zeroing init table entries, that caused program startup to fail to fill with zeros one or more memory ranges that should be filled with zeros.
[EW19853] -
When checking MISRA C rule 23,
ilinkarm
no longer erroneously includes some tool internal symbols, which could result in unwanted rule violation errors.
ilinkarm
also no longer crashes if error Li0005 (undefined symbol) has occurred previously.
[EW19897] -
A
place at
directive that matches no sections and contains no blocks and which overlaps the memory region of aplace in
directive, no longer causes an internal error when linking.
[EW19952]
[EW20030] -
When linking a project that contains overlapping ranges,
ilinkarm
no longer terminates with an internal error if the size of the overlap is small compared to the size of the ranges.
[EW19985] -
Intel hex output from
ielftool
no longer contains incorrect base address records if the source ELF file contains no data before sections that start on a new base address.
[EW20031] -
Copy initialization of code in a block is no longer generated incorrectly if the first thing in the block is a veneer.
[EW20040] -
Chained
if
directives (if...else if...else
) in linker configuration files now work correctly.
[EW20104] -
The linker no longer gets an internal error (range allocation inconsistency) when a
place at
and aplace in
section placement directive use the same start address.
[EW20183]
-
Copy code to RAM
Improved features for copying all of the code to RAM at program startup. See above. -
Position-independent veneers
The linker can generate position-independent veeners using the--pi_veneers
command line option.
V5.11 2007-12-11
ilinkarm
could erroneously place fall-through veneers at the start of aplace at
linker directive, displacing the section that was intended to end up there.
[EW19456]ielftool
(earlierichecksum
) now handles checksums for big-endian files correctly.
[EW19466]ielftool
(earlierichecksum
) did not recognize the arithmetic sum algorithm.
[EW19490]In some cases,
ielftool
(earlierichecksum
) did not write the checksum value to the output file.
[EW19496]The linker erroneously included multiple definitions for the same symbol when input contained a mix of weak definitions for the same symbol, where some of the definitions used an ELF section group, and some of the definitions did not.
[EW19502]ielftool
(earlierichecksum
) now prints an error message when the checksum placeholder variable is not defined asconst
.
[EW19538]Using
place at
into the middle of aplace in
range could earlier trigger an internal error.
[EW19578]-
ilinkarm
sometimes reserved an extra, unneeded, byte for 'place at' placements.
[EW19604] -
In some cases the linker could place a fall-through mode-changing veneer somewhere other than immediately preceding the destination of the veneer, resulting in non-working code.
[EW19726]
V5.10 2007-05-25
- First release.