Contents
- Important information
- New features
- Known problems
- Program corrections
- User documentation 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 : :
New features
-
None.
Known problems
-
Building with
cstartup.s
will cause the MISRA C checker to report errors.
[EW19800] -
The linker might report an internal error and terminate unexpectedly after issuing error Lp017.
[EW21191]
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]
User documentation corrections
-
IAR C/C++ Development Guide for ARM® (DARM-4), clarifications and corrections:
-
Page 53-54, 305-308: The
copy routine
parameter is not available in theinitialize by copy
directive.
-
Page 56: Replace
initialize by copy { readonly, readwrite } with packing lzw
with
initialize by copy with packing = lzw { readonly, readwrite };
-
Page 53-54, 305-308: The
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
- None.
-
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] -
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. -
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] -
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. -
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] 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] - First release.
V5.40 2009-07-10
New featuresV5.30 2009-01-23
New features
V5.20 2008-06-24
New features
V5.11 2007-12-11
V5.10 2007-05-25
Copyright © 2001-2009 IAR Systems AB.