RVCT 4.0: Build 925 patch for Windows

Download Download (Login Required) EULA included in archive


The RVCT v4.0 Web Patch #10 Build 925 is intended for use with ARM RVDS v4.0 products. It can be used to update RVDS 4.0 Standard, Professional or Evaluation installation, whether previously patched or an original installation. It is NOT compatible with other releases of RVCT/RVDS.

This patch consists of updated RVCT 4.0 compiler, linker, assembler, fromelf, and armar program executables, include files and C/C++ libraries.

OS Platforms

This patch has been tested on the following supported platforms:

  • Windows 7
  • Windows XP SP2, 32-bit & 64-bit
  • Windows XP SP3, 32-bit
  • Windows Vista Business Edition SP1, 32-bit & 64-bit
  • Windows Vista Enterprise Edition SP1, 32-bit & 64-bit
  • Windows Server 2003 32-bit & 64-bit
  • Red Hat Linux Enterprise 4 for x86, 32-bit & 64-bit
  • Red Hat Linux Enterprise 5 for x86, 32-bit & 64-bit  

In addition, the patch has been tested on the following non-supported platforms:

  • Windows 2000 SP4
  • SUSE Linux 9.2
  • Ubuntu Linux 8.10

Installation Instructions

To install the patch carry out the following steps:

  1. Ensure that you are currently using RVCT 4.0. To do this, type:

    armcc --vsn

    and ensure that this returns RVCT 4.0 build 400 or later.

  2. Extract all the files from the ZIP file into a temporary directory.

  3. Copy the include directory from the temporary directory to replace your existing include directory. The existing directory can be located by the RVCT40INC environment variable, e.g:

    C:\> set RVCT40INC
    RVCT40INC=C:\Program Files\ARM\RVCT\Data\4.0\400\include\
  4. Copy the lib directory from the temporary directory to replace your existing lib directory. The existing directory can be located by the RVCT40LIB environment variable, e.g.:

    C:\> set RVCT40LIB
    RVCT40LIB=C:\Program Files\ARM\RVCT\Data\4.0\400\lib\
  5. Copy the win_32-pentium directory from the temporary directory to replace your existing win_32-pentium directory. The existing directory can be located by the RVCT40BIN environment variable, e.g.:

    C:\> set RVCT40BIN
    RVCT40BIN=C:\Program Files\ARM\RVCT\Programs\4.0\400\win_32-pentium\
  6. The updated tools should now have been installed. To confirm this, open a DOS command prompt window and enter:
    armcc --vsn
    armlink --vsn
    armasm --vsn
    fromelf --vsn
    armar --vsn
    The version returned should be RVCT 4.0 build 902.

Enhancements since RVCT 4.0 build 902

  • Two command line options have been added to give more control over the generation of BLX. --[no_]blx_arm_thumb controls whether the linker can generate a BLX for ARM to Thumb calls. --[no_]blx_thumb_arm controls whether the linker can generate a BLX for Thumb to ARM calls. These options default to allowing BLX to be generated. [SDCOMP-14942]

Corrections since RVCT 4.0 build 902

  • A ternary condition could have one of its expressions evaluated before its condition. This could result in unsafe memory accesses if, for example, the expression is a memory access and the condition performs a bounds check. This has been fixed. [SDCOMP-14344]

Build 902

Enhancements since RVCT 4.0 build 870

  • A new option, --[no_]intermediate_object_files, has been added. In a combined compile-and-link step where -c is not specified, when --no_intermediate_object_files is specified the compiler will use temporary files for the compiled object files and remove them after the link. Object files will not be created in the current directory as normal. The default is --intermediate_object_files (preserving the previous behaviour) for normal armcc invocation, and when using GCC command-line translation the default is --no_intermediate_object_files. [SDCOMP-10711]
  • A symdefs file allows global symbols used from the output of one link step, to be used as input into the another link step. A multiple symbol definition error L6200E can occur when the symdefs file contains global symbols defined by a section that is a member of a comdat group, and the user of the symdefs file generates the same comdat group. An example of such a symbol is a compiler helper function that is defined by both the symdef file and the application.
    The linker will now resolve this conflict by choosing one of the symbol definitions and reject the other. The choice of which definition is chosen is controlled by the command line option --comdat_symdefs_preference=preference, where <preference> is one of symdefs or comdat. When <preference> is symdefs the linker will choose the definition from the symdefs file, when <preference> is comdat the linker will prefer the definition from the comdat group. The default <preference> is symdefs. [SDCOMP-11078]
  • armlink now supports the ANY_SIZE scatter file keyword. This allows a user specified limit to the amount of content that can be assigned to a .ANY selector in that execution region. The syntax is:
    exec_region <base> ANY_SIZE <size>
    Specifying ANY_SIZE on a region will override automatic contingency for that region. armlink will not assign any content beyond this user specified limit.
    The armlink --info=any diagnostic has been augmented to display the contingencies for each region.
    armlink error message L6220E has been improved to report the amount of linker generated content in the region that exceeded its limit.
    Previously armlink would sometimes incorrectly clear .ANY contingency from regions. This has been corrected. [SDCOMP-10588]
  • A new sorting algorithm is available for the linker's --sort command-line option. This is selectable using --sort=objectcode. The algorithm sorts code sections by tiebreaker, all other sections are sorted lexically. This algorithm is most useful when --tiebreaker=cmdline as this will tend to group all the sections from the same object together in the memory map. [SDCOMP-10898]

Corrections since RVCT 4.0 build 870

Compiler (armcc)

  • At optimization level -O3 -Otime, the compiler could generate incorrect code for while loops that have a fixed iteration count, where the loop condition involves comparing unsigned integers with constants other than zero, and the number of loop iterations is small. [SDCOMP-11082]
  • At optimization level -O3 -Otime, the compiler could generate wrong code when a function reference appears as an initialization in a declaration block, and a dereferenced pointer appears as an initialization in the same block of declarations, and the function changes the value pointed to by the pointer. [SDCOMP-10940]
  • In certain situations at all optimisation levels storing the address of a recursive data structure inside itself (or use of pointer arithmetic to achieve a similar result) would cause an UNPREDICTABLE store instruction to be generated. This has now been fixed. [SDCOMP-10900]
  • Some instances of internal fault 0x413ad2 when using --gnu_instrument have been fixed. [SDCOMP-10801]
  • armcc would sometimes generate incorrect code at -O3 -Otime. If a while loop conducted via a variable decrement at the end was unrolled, the first iteration could be skipped. [SDCOMP-10789]
  • armcc would sometimes generate incorrect code at -O3 -Otime. Certain loops accessing pointers to pointers would reference out-of-date values when unrolled. [SDCOMP-10787]
  • In certain situations at -O1 and above when a local array of shorts is written to using an array index expression containing either ? : or an inlined function then subsequent reads of the array would have the wrong value. This has been fixed. [SDCOMP-7494]
  • Internal fault 0xa95fee occurring in some situations when NEON 'multiply by 16-bit scalar' instrinsics were used has been fixed. [SDCOMP-7352]
  • When inlining functions with an implicit cast upon returning at -O3 -Otime, armcc would sometimes incorrectly remove the necessary cast. [SDCOMP-7346]
  • When using link-time code generation in thumb mode, internal fault 0x2732f5 could be raised as a result of decisions made by the cross-module inliner. This no longer happens. [SDCOMP-7333]
  • Using NEON intrinsics, armcc used to incorrectly treat VBIC and VORN as commutative operations when the first argument was a static constant. This is fixed. [SDCOMP-7318]
  • Some instances of internal fault 0xaac48d when compiling with --remove_unneeded_entities have been fixed. [SDCOMP-7214]

Linker (armlink)

  • When running under Cygwin with the CYGPATH environment variable set to the location of cygpath.exe the RVCT tools will call cygpath.exe to convert between Cygwin and native Windows paths. With version 1.7.7 of Cygwin the linker was unable to use cygpath to translate a --libpath or RVCT40LIB that included a Cygwin path. This has now been fixed. [SDCOMP-10621]
  • The --veneer_inject_type=pool veneer generation model required branches to veneers in the pool to be able to reach the pool limit, which is the highest possible address a veneer could take. If a branch were later found that could not reach the pool limit armlink would give error message L6828. armlink will now reduce the pool limit to accomodate the branch if it is able to fit all the veneers in the pool into the lower pool limit. Error message L6828 will only be given if the linker is unable to lower the limit. [SDCOMP-10620]
  • The armlink --info=any output has been enhanced to contain the section index and size, and to print archive names when appropriate. [SDCOMP-10604]
  • armlink no longer crashes when an object file is passed via the RVCT40_LINKOPT environment variable [SDCOMP-10589]
  • The Unix and Windows tools would sometimes output the sub-blocks of an .ARM.attributes section in different orders for no good reason, making it harder to determine whether an image had changed in any important way. [SDCOMP-1836]
  • The linker would incorrectly set the entry size attribute of a version definition section. This is now correctly set to 0. [SDCOMP-10616]

Assembler (armasm)

  • The assembler now accepts an optional # before the rotation in ARM data-processing immediate instructions where the immediate encoding is specified directly (e.g. ADD r0,r1,#3,#4) [SDCOMP-8966]

C/C++ Libraries

  • The Cortex-M3 C libraries had only one variant of strcmp, which depended on unaligned access. Now they also provide a variant which does not. [SDCOMP-7954]
  • The complex number functions clog() and cexp() in the library behaved wrongly when errno was non-zero on entry. cexp would sometimes clear errno to zero, and clog could even return the wrong answer. [SDCOMP-1933]

ELF format converter (fromelf)

  • fromelf previously failed to report an error message if the syntax for selecting members of an archive (such as 'archive.a(*.o)') was used on a file which was not an archive or did not exist. Now it does. [SDCOMP-2381]
  • The microlib qsort() function could hang forever when sorting an array containing elements that compare equal. Also, even when it did not hang, it had very poor performance. [SDCOMP-7957]

Build 870

Corrections since RVCT 4.0 build 821

Compiler (armcc)

  • When compiling with C++ exceptions enabled (--exceptions), function exception specifications containing reference types, for example, void g(void) throw(int&) {...} caused a compiler internal fault. This has been fixed. Function exception specification types that are reference-to-pointer-to-class (C * &) are not handled correctly and produce a downgradeable compile-time error #2818 as an alert. Downgrading the error treats the types as if the reference (&) was omitted, which results in slightly different runtime semantics to those implied by the source (throws of pointer-to-derived-class become permitted). See sections 15.4/7 15.3 of the C++ Standard incorporating TC1. [727197]
  • In GNU mode, attempting to use the 'aligned' attribute to decrease the alignment of variables was faulted with message #1039. This is now allowed, except for array variables where it is ignored (as for GCC). [727773]
  • Causes of internal faults 0x84aef9 and 0x45464 has been fixed. [740654]
  • A cause of internal fault 0x44784c at -O3 -Otime has been fixed. [741821]
  • A cause of internal fault 0x3e9d63 with --exceptions has been fixed. [730514]
  • When using --dllimport_runtime and LTCG, the compiler could sometimes fail to import certain runtime functions referred to from compiler-generated helper functions. This is now fixed. [735414]
  • A cause of internal fault 0xfe1945 at -O3 -Otime has been fixed. [737716]
  • The error handling for incorrect use of bit-banding has been improved. If a bitband object is placed outside of a bitband region (either with the at attribute or with a integer literal pointer), the compiler will take the following action:
    • If the object type has had the bitband attribute applied to it, and --bitband isn't specified on the command line, the compiler will give an error.
    • If the object type has had the bitband attribute applied to it, and --bitband is specified on the command line, the compiler will give a warning, and ignore the request to bitband.
    • If the object type hasn't had the bitband attribute applied to it, and --bitband is specified on the command line, the compiler will ignore the request to bitband.
    In addition, the at attribute is no longer accepted on declarations with incomplete types. [740150]
  • In GNU C++ mode, std::type_info is now predeclared, as an incomplete type. [740973]
  • The compiler could stop with an internal fault, in cases where extremely large switch statements were compiled (generating more than 128KB of code) with lots of case statements (> 256 cases). This has been fixed. [741084]
  • The compiler could produce incorrect code when -O3 -Otime --vectorize is specified, for source code where there is a repeated expression involving the same array and casts on the left hand side of different assignment expressions. This is now fixed. [742024]
  • In certain situations when a method is called on an object returned by reference from another method call then incorrect stack offsets in accesses to the object would be generated. This has now been fixed. [742819]
  • The compiler could generate an LDRD to a word-aligned but non-doubleword-aligned address when compiling for an architecture v5TE target. This has been fixed. [743326]
  • The compiler would sometimes generate incorrect code at -O3 -Otime, the iteration count for an unsigned int downcount index would sometimes be calculated incorrectly, this could occur when the loop index is unsigned and downcounts by an increment other than 1. [744069]

Assembler (armasm)

  • Previously the assembler would diagnose error A1322E for LDR/STR pc,[pc,#n] where n is not a multiple of 4. This message should only be emitted for LDR instructions, where the result is UNPREDICTABLE. This is now fixed. [731801]
  • The assembler was not diagnosing unpredictable coprocessor instructions on coprocessors 0, 1, 10 and 11. This has been fixed, and the assembler will now report error A1477. [734903]
  • The assembler would allow the index for a transfer from a NEON lane into an ARM register (VMOV.<dt> Rd,Dm[n]) to be omitted. This is invalid syntax and is now faulted. [734910]
  • The assembler reports the error A1912E if ANDS, EORS, ADDS and SUBS instructions with PC as destination are assembled in Thumb, when previously the assembler would silently accept this invalid syntax. [741070]
  • The assembler incorrectly allowed IT instructions with the .W qualifier in Thumb. This is now fixed. [741275]
  • Fixed problems resulting in error A1023E when using the --cpreproc option in parallel builds. [741370]
  • In the assembler, writing a branch to an unaligned offset caused an internal fault after diagnosis. This has now been fixed. [742922]
  • Any shift specified on "MOVS pc,lr,<shift>" instructions was being ignored by the assembler. This case is unpredictable so the assembler will now diagnose error A1477. [743220]
  • The assembler incorrectly allowed shifting by register in the addressing mode for PLD, PLDW and PLI instructions. This is now fixed. [743221]
  • The assembler was faulting r15 as desination register in MRC instructions. This is pre-UAL syntax for coprocessor instructions when the CPSR is adjusted as a result. This is now fixed. [744774]

Linker (armlink)

  • The linker now orders .fini_array sections correctly in --sysv images to ensure destructor functions are executed in the correct order. [737347]
  • The linker no longer tries to check out two licenses when linking with --ltcg. [737667]
  • The --any_contingency option has been improved to allow contingency space for possible veneers. Usage of the switch is as before - however previously images requiring large amounts of veneers could sometimes overflow regions with .ANY. [743027]
  • When merging comdat groups the linker can incorrectly turn references to weak definitions in rejected groups into weak references. This can cause unused section elimination to throw away sections that should be kept. This has now been fixed. [743820]
  • With large region support enabled, --sort=LexicalState could sometimes sort sections incorrectly (by average call depth). This will not longer occur. [744630]
  • --any_sort_order=cmdline did not function as documented. It will now correctly sort sections for processing by .ANY placement in command line index order. [744636]

C Libraries

  • The posix_memalign function failed to operate correctly in a multithreaded environment: depending on circumstances, it would either not lock any mutex at all, or lock a nonexistent one. [741380]
  • From build 762 onwards, in a multithreaded program, the fgets(), gets(), fputs() and puts() functions could fail to unlock the stream's mutex if they returned due to error or EOF. They now unlock the mutex reliably. [742769]
  • The minimal stdio implementation in microlib behaved incorrectly if _sys_seek() returned a positive value. The internal state would not be updated by fseek, and the return values of fseek and fsetpos would be incorrect. This has been fixed. [743383]
  • The stdio implementation in the library should now not crash when the heap runs out of memory. [743634]

ELF Format converter (fromelf)

  • The disassembly of 16-bit Thumb PC-relative LDR instructions with a relocation tended to append a spurious "+1024" to the target symbol name.  This has been fixed. [738998]
  • On Windows, "fromelf -v -g" or "fromelf -y -g", applied to an image containing a .debug_str section, could cause fromelf to crash with an illegal storage access. [743339]

Multiple tools

  • The C99 complex number functions in the C library (declared in <complex.h>) have hitherto used the wrong procedure call standard in hardware floating point environments. The library functions defined under their standard names (csin, ccos, cexp etc) expected their arguments in VFP registers, and the compiler generated calls to them in the same way. As a result, hardfp and softfp compiled code which called the complex library functions could not be linked together (because one or the other would try to call the library functions wrongly).
    This is now fixed, so that csin, ccos etc pass their arguments in integer registers, and the library also provides alternative entry points called __hardfp_csin, __hardfp_ccos etc which use VFP registers.
    Unfortunately, the effect of this is that existing hard-FP object code which calls the complex library functions will not function correctly when linked against the fixed libraries. The linker will issue a warning when resolving a reference to any <complex.h> function from an object whose .comment section contains an identification string from an affected build of armcc and whose .ARM.attributes section indicates that it uses the VFP variant of the AAPCS (Tag_ABI_VFP_args = 1). [741936]

Build 821

Enhancements since RVCT 4.0 build 771

General enhancements

  • The tools now support --cpu=7E-M to generate code for the 7-M architecture enhanced with DSP (saturating and 32-bit SIMD) instructions as featured in the Cortex-M4 processor. [736675]
  • armlink now supports a new sorting type: --sort=LexicalState. This sorts all Thumb code before ARM code and then sorts lexically. [738147]
  • armlink now supports a new switch --[no_]crosser_veneershare. The default is --crosser_veneershare which keeps the existing behaviour of allowing veneer sharing across execution regions. --no_crosser_veneershare prohibits veneer sharing across execution regions. [737516]
  • armlink now supports the option --emit-non-debug-relocs. This functions like --emit-relocs but outputs only relocations from non-debug sections. [737515]
  • Added new linkeroption --veneer_inject_type=<type> where <type> can be either individual or pool. The default is individual. The option controls the veneer layout when --largeregions mode is on. When --veneer_inject_type=individual the linker will place veneers so that they can be reached by the largest amount of sections that use the veneer. Veneer reuse between Execution Regions is permitted. This type minimises the number of veneers that are required but disrupts the structure of the image the most. When --veneer_inject_type=pool the linker will collect veneers from a contiguous range of the Execution Region and place all the veneers generated from that range into a pool placed at the end of the range. A large Execution Region may have more than one range and therefore more than one pool. This type has much less impact on the structure of image but has less opportunities for reuse as 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 may need veneers. A branch is predicted to need a veneer when a state change is required, or when the distance from source to target (plus a contingency) is greater than branch range. The size of the contingency can be set with the --veneer_pool_size=<size>. By default it is set to 102400 bytes. The --info=veneerpools option provides information about how the linker has placed veneer pools. [737514]
  • Added a new linker option --tiebreaker=<tiebreak> where <tiebreak> is either creation or cmdline. A tiebreaker is used when a sorting algorithm needs a total ordering of sections. The default tiebreaker is creation, which is the order of creation of the section data structure within the linker. The alternative --tiebreaker=cmdline is the order that the section appears on the command line. The command line order is defined as File.Object.Section where 'Section' is the sh_idx of the section within the object. 'Object' is the order that the object appears within the file. 'File' is the order the file appears on the command line. The order that the object appears within the file is only significant if the file is an ar archive. To alter the format of mapfile (generated by --map) to show command line order use the --section_index_display=cmdline switch. [737517]
  • The linker now supports additional options for controlling placement of .ANY sections. There are two new command line options: --any_sort_order=<order> where <order> is either descending_size (sort in descending size order) cmdline (sort by command line index) The default is descending_size. --any_placement=<algorithm> where <algorithm> can be first_fit (place the section in first ER with space), best_fit (place the section in ER with least free space, worst_fit (place the section in ER with most free space), or next_fit (place the section in current ER if there is sufficient space, or move to the next ER in the scatter file if there is insufficient space. Never back-track to previous ER). The default is worst_fit. Additionally a new info option has been added: --info any. This will output the sort order, assignment algorithm, and which sections are assigned to which execution region in the order that they are processed by the placement algorithm. [737513]

Corrections since RVCT 4.0 build 771

Compiler (armcc)

  • A code generation issue that generated a dereference to uninitialized pointer is now fixed. [734706]
  • Warnings and errors have always been suppressed in system header files. They are now also suppressed in the corresponding implicitly included template implementation files. [736105]
  • When using --remarks, passing a wide string (L"abc") to a printf function could generate a remark #181 about incompatible printf argument even if the corresponding format string was "%ls". The remark now does not occur in this situation. [735496]
  • When using --multibyte_chars in GNU modes, the compiler might detect a spurious line concatenation character when a line ended with a multibyte character (e.g. in a comment) followed by one or more whitespace characters. When using C++-style trailing comments, this might cause incorrect interpretation of source code. [737748]
  • In GNU C++ mode, use of compound literals (a C99/GNU extension) to initialize file-scope variables could result in runtime failures. This is now fixed. [736266]
  • Some small corrections have been made to GCC command line translation. [735554]
  • A cause of internal fault 0xe70a0c with -g --remove_unneded_entities has been fixed. [738296]
  • A cause of internal fault 0xfe1945 and 0x0d9189 at -O3 -Otime has been fixed. [737716, 735852]

Assember (armasm)

  • The new option --branchpatch=cortex-a8_q109 has been added to work around a Cortex-A8 bug by inserting NOPs to avoid a wide branch spanning a page boundary. [736360]

Linker (armlink)

  • armlink could assign an incorrect type to .dynstr sctions, which could result in fromelf generating error Q0454E. This has been fixed. [732898]
  • armlink will now process old-style region tables correctly. Previously under certain circumstances armlink would fail to link images which implemented their own scatterloading mechanism using old-style region tables, exiting with "ARM Linker: Execution interrupted due to an illegal storage access". [734549]
  • armlink will now report error message L6065E when failing to a write contiguous block larger than the maximum of 2GB. [728400]
  • armlink now orders .fini_array sections correctly in --sysv images to ensure destructor functions are executed in the correct order. [737347]
  • armlink callgraphs give enhanced function pointer information and combine multiple calls to the same function pointer from the same section. [736849]
  • The linker no longer tries to check out two licenses when linking with --ltcg. [737667]
  • armlink will generate long branch veneers for branches from position independent code in a 'PI' execution region to targets in an 'Absolute' execution region. By default armlink was not reusing these veneers leading to a large code-size increase. This has now been fixed and armlink will reuse these veneers when it is safe to do so. [738802]

C/C++ Libraries

  • The full Unicode wide-character ctype functions towupper() and towlower(), if enabled with #pragma import __use_utf8_ctype and #pragma import __use_full_wctype, and if compiled using --wchar32, would return the wrong answers for the character pair U+1D79 and U+A77D, which should be lower-case and upper-case versions of each other. [736950]
  • In strict C++ mode, <wchar.h> and <cwchar> no longer declare the FILE type. Also, the macro __ARM_WCHAR_NO_IO can now be defined to cause these headers not to declare FILE or the wide I/O function prototypes. [733711]

ELF format converter (fromelf)

  • Sometimes, fromelf --bin would name an output file after an unrelated SHT_NOBITS section which shared the same file offset as the segment contained in the file. [735346]

Multiple tools

  • When producing DWARF debug information, the assembler and compiler could output CIE and FDE records that had a length that was not a multiple of four, which can cause problems for third-party debug tools. This has now been fixed to produce padding in the appropriate places. [733101]
  • --cpu=Cortex-M4.fp now sets the predefined macro __TARGET_CPU_CORTEX_M4, not __TARGET_CPU_CORTEX_M4_FP as previously. The presence of FP can be tested using the __TARGET_FPU_VFP macro. [736497]
  • In Japanese message locales, when using --diag_style=ide, the comma between file line and column is now an ASCII comma rather than a Kanji comma. [736125]

Build 771

Enhancements since RVCT 4.0 build 697

Changes made to improve compatibility with other toolchains

  • The AEABI specifies that volatile bitfields are accessed as the size of their container type. Some versions of GCC will instead use the smallest access size that contains the entire bitfield. The compiler switch --narrow_volatile_bitfields has been added to emulate this non-AEABI compliant behavior. [731902]
  • A compiler command-line option (--configure_gcc_version) has been added that takes a GCC version number of the form x.y.z and uses this as the GCC version to report. This option can also be used when configuring against a GCC installation to override the reported version, however it will warn if the user override is older than the version reported by the GCC queried. [729761]
  • The compiler now has an option --[no_]execstack to generate a .note.GNU-stack section marking the stack as executable or non-executable. If this option is not used then the note section is not generated. The option --arm_linux implies --no_execstack. [725814]
  • When --gnu is specified, the compiler will now use unsigned quantities for enums which contain no negative values. [728146]
  • The C libraries now provide the posix_memalign() function to allocate aligned storage. The storage can be freed with free(). [731812]

General enhancements

  • RVCT now supports the VFPv4 floating point architecture (--fpu=VFPv4) [731258]
  • The compiler is now able to reuse precompiled headers (PCH) when the current directory and/or source file directory are different from when the PCH file was created. [375431]
  • An optional SIZE attribute is now supported on IMPORT and EXPORT directives to allow symbol sizes to be specified in assembly (e.g. EXPORT dataSymbol[DATA,SIZE=8]). [730839]
  • A new compiler option --import_all_vtbl has been added. This causes external references to class impedimenta variables (vtables, RTTI, etc.) to be marked as having dynamic linkage. The option does not cause definitions of class impedimenta to have dynamic linkage. [727750]
  • The linker will now produce warning message L6491W whenever a dynamic relocation is generated in an OVERLAY region and message L6492W when the target of the dynamic relocation is in an OVERLAY region. [728049]
  • A new option --[no_]implicit_key_function has been added to control whether an implicitly instantiated template member function can be selected as a key function. (Normally the key, or decider, function for a class is its first non-inline virtual function. However, in the case of an implicitly instantiated template function, the function would have vague linkage, i.e. might be multiply defined.) The default is unchanged, allowing the key function to be implicit. Also, a new remark #2819-D is now produced when a key function is implicit. This remark can be seen with --remarks or with --diag_warning=2819. [732323]
  • For multithreading users, the library now supplies variant forms of the high-level stdio functions (fputs, fgets, printf etc) which lock the target stream once for the whole call instead of separately per character. This should improve performance, and also mean that calls to printf reliably appear as a whole in the output (rather than potentially being interleaved character by character with output from other threads). [727119]
  • The --library_interface switch now supports options to allow armcc to use version-specific optimized functions from earlier version of the RVCT libraries. These options are rvct30, rvct30_c90, rvct31, rvct31_c90. The options rvct40, rvct40_c90 are also provided. [717109]
  • In strict C++ mode, <wchar.h> and <cwchar> no longer declare the FILE type. Also, the macro __ARM_WCHAR_NO_IO can now be defined to cause these headers not to declare FILE or the wide I/O function prototypes. [733711]
  • armlink now supports printing load addresses for execution regions in the map file. This must be enabled using the --load_addr_map_info switch (--map must also be specified). This is disabled by default.

Corrections since RVCT 4.0 build 697

Compiler (armcc)

  • Some causes of the following internal faults have been fixed: 0x87ecef, 0x6bca8b, 0x6bca8b, 0x413ad2, 0xd9827b, 0xcc3958, 0x2732f5, 0xafc2db, 0xa05965, 0xf7584e, 0xb36758, 0x2d4b56, 0xa718eb and 0x4553df.
  • An access to, or test against, a volatile variable could incorrectly be lifted out of a loop at -O3 -Otime. This no longer occurs. [733001, 729956]
  • On Windows, the compiler could fail to correctly process UTF-8 source code that was introduced by a BOM (byte order mark). This is now fixed. [732849]
  • Previously, when a class template member function was marked as dllimport in its declaration and as dllexport in an out-of-class inline definition, instantiating the class might not result in an out-of-line copy of the member function, contrary to the principle that an out-of-line copy is always generated for a dllexport function (even one marked as inline). This is now fixed. [732208]
  • With optimization options -O3 -Otime, when inlining a function that used a formal parameter more than once, if the corresponding actual argument contained an increment, this increment could occur more than once. This is now fixed. [732499]
  • At optimization level -O1 or above, warnings #177-D (variable declared but never referenced) and #550-D (variable set but not used) could be produced for local variables of class type constructed using a default constructor with an empty body. These warnings are now suppressed, as they normally are when the constructor is not empty. [732465]
  • The unnumbered messages about creation and reuse of precompiled header (PCH) files were not being correctly localized when --message_locale was used. This is now fixed. [732406]
  • A code generation bug at -O3 -Otime which caused write past end of buffer when writing 3 bytes per iteration in a down-counting do-while loop has been fixed. [732346]
  • There were various problems with applying 'new' and 'delete' to arrays of objects where the type had alignment greater than 8 bytes (i.e. as set by the 'aligned' attribute). This usage now works correctly. [731813]
  • An exception table generation fault could result in a throw from a destructor invoked as part of a goto or return from a nested try block could be directed to the wrong catch handler. This has been fixed. [730117]
  • When using --visibility_inlines_hidden, some inline functions of classes marked as dllimport were neither generated nor imported. These functions are now generated. [731207]
  • The compiler could incorrectly optimize away accesses to volatile fields of structures where the structure itself was not volatile. This is now fixed. [727881]
  • Errors in embedded assembly source could result in an output object file being left in an incomplete state. This has been fixed [726941]
  • In cases where all direct calls to a function pass an argument with the same constant value, this value can be substituted into the body of the routine. The compiler was incorrectly doing this in some cases where the function may be indirectly called. This is now fixed. [730281]
  • A code generation fault that affected the XVID example supplied with RVDS has been fixed. [727352]
  • The --list_macros option without -E now correctly generates only a list of macro declarations as they are defined at the end of the preprocessed source. When given with -E (or similar option, e.g. -P) macro #define and #undef directives will be interleaved in the preprocessed source that is produced.
  • Static routines to which an alias was created (using the 'alias' attribute), were permanently retained in an image even if not used. This is now fixed. [729567]
  • The compiler now only defines __STDC_IEC_559__ if the FP model (as set by --fpmode) fully conforms to the IEEE floating-point model requirements in Annex F of the C standard. This does not depend upon the source language (C90, C99 or C++). [724114]
  • The compiler now defines the __MULTIFILE macro when the --multifile option is used explicitly or implicitly. It is recommended that any source-level conditionalization currently detecting this feature by testing whether __OPTIMISE_LEVEL is at least 3, should change to testing __MULTIFILE. [729445]
  • Internal fault 0x04cb7b could occur when generating debug information for a virtual function of a multiply inherited class marked __forceinline. This is now fixed. [732688]
  • The compiler could fail to notice cleared least significant bits of a loop counter and generate unnecessary loop cleanup code after unrolling in the presence of #pragma unroll at -O3 -Otime. This is now fixed. [626066]
  • The combination of LTCG and the --dllimport_runtime option could result in references to some exceptions runtime routines not being given dynamic linkage. This is now fixed. [733308]
  • The compiler could in some cases attempt to parse filenames beginning with '-' as options, even when following a "--" option terminator argument. This is now fixed. [733245]
  • Where a catch clause used a reference to a class type, e.g. "catch (C &c)", the compiler could fail to generate the type information for the underlying class C. This is now fixed. [732867]
  • In the compiler, some intrinsics including __ssat(), __smuad() and __smlad() were in some cases incorrectly not regarded as affecting the Q flag, leading to some Q-flag accesses being removed as redundant. This is now fixed. [729899]
  • The compiler could run slowly when generating objects with a very large number of sections, e.g. when using --split_sections on large sources. This is now fixed. [733748]
  • On Windows, when invoked via a relative path from within Perl, GNU make or similar programs, the compiler could sometimes fail to find the assembler and linker, e.g. when processing embedded assembler. This is now fixed. [733795]
  • At -O1 and above, it was possible for copy-constructors not to be synthesised properly. This could occur for a class A deriving from a class B which derived from multiple (possibly polymorphic) base classes all of whose fields could be copy-constructed with a bitwise copy. In this case the copy constructor synthesized for A might only set the vtable pointer and not copy the base class contents. This is now fixed. [733659]
  • At -O3 -Otime, when an object expression with an incremented subscript has an inlined member function call, the subscript increment was duplicated. This is now fixed. [734246]

Assember (armasm)

  • The assembler now allows REQUIRE8 or PRESERVE8 to override earlier instances. [732197]
  • Writing to system registers MVFR0 and MVFR1 with VMSR is diagnosed as unpredictable. [720647]
  • The assembler would previously allow you to use the EQU directive with an expression of the form {ABSOLUTE} - {RELATIVE} to define a symbol, which could not be resolved correctly. The assembler now raises error A1109E if you attempt to do this. [647017]
  • An issue has been fixed that could cause a REQUIRE directive to be ignored if RELOC is used soon after. [731252]
  • When generating code for 16-bit Thumb instruction sets without CMN, the assembler would substitute CMN Rn, #0 with CMP Rn, #0, which has incorrect flag-setting behaviour. The instruction is now faulted. [728052]
  • An out of memory issue when the ALIGN directive is used with an offset that is not a multiple of 4 bytes has been fixed. [729860]
  • Assembler did not accept N and L shaped instructions with only source operand data types specified (for example VADDHN.I16.I16 d0,q1,q2). This is now fixed. [719906]

Linker (armlink)

  • Linker inlining could incorrectly inline only 2 instructions of a Thumb function containing 3 halfword instructions. This has been fixed. [732427]
  • A Position-Independent RO section can now be placed in the same PI Execution Region as a RW section without causing a spurious L6265E error. [730622]
  • A section with the name of RO could be incorrectly matched by name by the scatter loading selector (+RO). Similar cases exist for RW and ZI. These have now been fixed. [730269]
  • When using the armlink --symbols option on a large project containing many C++ mangled symbols, the linker could produce the message 'Fatal Error L6000U: Out of memory' when trying to display the unmangled symbol names. This has now been fixed; armlink now uses much less memory when using the --symbols option. [730197]
  • Linking microlib against code compiled using --enum_is_int no longer causes link error L6242E. [729408]

C/C++ Libraries

  • The C library now contains functions _srand_r(), _rand_r() and _setlocale_r(), which are like the standard C functions srand(), rand() and setlocale() except that they use user-provided buffers instead of static data inside the C library. [721560]
  • The version of __cxa_vec_cctor selected when using C++ exceptions did not correctly handle the case where the construction function pointer being passed is NULL. This is now fixed. [730012]
  • If configured (via --remarks or otherwise) to report mismatches between a printf format string and its arguments, armcc would report a mismatch between the inttypes.h macro PRIu8 and the argument type it is specifically supposed to match (uint8_t). Likewise for PRIu16, PRIuLEAST8 and PRIuLEAST16. Also, the inttypes.h macros SCNd8, SCNi8, SCNo8, SCNu8 and SCNx8 were missing. [733080]

ELF format converter (fromelf)

  • "fromelf --fieldoffsets" used to crash in some situations when an object file's debug information described a structure type containing an anonymous substructure, or a C++ class which inherited from a base class with no name. [733770]

Multiple tools

  • Checking out a license in queue mode times out quickly and can occasionally cause FLEX error: 'Licensed number of users already reached. (-4,342)', instead of showing the correct message: 'Warning: C9933W: Waiting for license...', even when using the --licretry option. This issue is likely to occur when the license checkout frequency is very high, e.g., when using parallel make (make -j). This has now been fixed by increasing waiting time. [721403]
  • Using the --version_number option could sometimes attempt to obtain a license. This is now fixed. [730056]

Build 697

New Enhancements in this Release - Key Features

Changes made to improve compatibility with other toolchains:

  • Modifications have been made to the GCC command line translation feature to improve compatibility. In particular, when using GCC command line translation the default optimization level is now set at -O0, and not the normal armcc default of -O2. [727559]
  • The compiler now defines the __builtin_bswap32 and __builtin_bswap64 intrinsics for compatibility with GCC. These reverse the bytes in a 32-bit and 64-bit word respectively. [714828]
  • The compiler now warns with diagnostic #29-D if the expression in an #elif directive is missing, even if the #elif would not normally be evaluated because of a previous successful #if or #elif. This warning is not output when emulating versions of GCC earlier than 4.4 (note that the default in GCC emulation mode is to emulate GCC 4.2). [728705]
  • When linking with --sysv (as implied by --arm_linux) the linker will set the sh_link field of the .ARM.exidx Section to the index of the .text section. This improves interoperability with objcopy. [723436]
  • In GNU mode, a reference to C::C in an expression context, where C is a class name, is now treated as a call to the constructor. This more closely reflects GCC behaviour. [726327]
  • The --gnu_defaults option now also sets --no_implicit_include by default. [726255]

Improvements to math libraries:

  • The handling of error cases in the maths library (mathlib) has historically been implemented by RVCT in a way that is inconsistent with Annex F of the C99 standard. C99-compliant error handling is now supported as an alternative, although the historical RVCT behaviour is still used by default. The C99 behaviour can be enabled by importing the symbol __use_c99_matherr in your program. Specifically affected functions are:
    • atan2
    • atanh
    • hypot
    • lgamma
    • log
    • log10
    • log2
    • log1p
    • pow
    • tgamma
    and their single-precision counterparts. [720506]

General Enhancements:

  • Cortex-A5 is now listed as a compiler supported CPU. [726103]
  • The linker can now remove unused sections when building DLLs and shared libraries. 720889]
  • Diagnostics for deprecated registers in instructions are only emitted by the Assembler when assembling for a CPU with 32-bit Thumb instructions. To enable these on other architectures use the option --diag_warning=1745,1786,1788,1789. [728201]
  • To track a change in the ARM Architecture Reference Manual, the assembler allows the '#' character seen prior to immediate operands to be omitted. Warning A1865W is emitted when this syntax is used to allow detection of source code that may not assemble with other (or older) assemblers. [365430]
  • The new assembler option --[no_]execstack option can be used to build a .note.GNU-stack section describing whether the code requires an executable stack. [725813]
  • The compiler now ignores a 3-byte byte order mark (BOM) at the start of source files. [725395]
  • Since RVCT 3.0 the compiler has implemented the resolution to C++ Core Issue #446 which requires use of a temporary to hold the result of a conditional expression whose result is a class rvalue. Because this can (in rare cases) change the behaviour of programs, it is now possible to diagnose cases where such a temporary is introduced, by use of a new remark #2816. This can be enabled with --remarks or --diag_warning=2816. [726389]
  • New compiler options have been added to specify the directory for output files. --output_dir specifies the output directory generally, including for .o files. The directory for assembler output can be specified with --asm_dir, for dependency output with --depend_dir, and for --list output with --list_dir. If these options are not used the corresponding output is put in the directory specified by --output_dir, or if that is not specified, in the default location (e.g. the current directory). [724352]
  • It is now possible to produce makefile dependencies and preprocessed source output in a single step, using the combination --md -E (or --md -P to suppress line number generation). [606117]
  • It is now possible to take source code from the standard input stream in combination with other files, when performing a link step. For example, the following are now permitted: "armcc -o output.axf - object.o mylibrary.a", "armcc -o output.axf --c90 source.c -". The behaviour of "armcc -o test.axf -" is also changed to be consistent with the above, such that this will compile the source provided on standard input and link this into test.axf. Combining standard input with other source files when not linking is still not permitted, and this will still produce error C3078E. [723225]
  • The linker has a new option --[no_]import_unresolved. The default is --import_unresolved. When linking a shared object with --sysv --shared, unresolved symbols are normally imported rather than causing an error to be generated. When --no_import_unresolved is specified, unresolved references from object files explicitly listed on the linker command line will cause an undefined symbol error rather than being imported. [727609]
  • A new linker option --no_eager_load_debug has been added, which instructs the linker not to retain debug section data in memory after object loading. This lowers the peak memory usage of the linker. Partial linking also benefits from the lower memory usage. [722351]
  • To support non-executable stacks, the linker now generates the appropriate PT_GNU_STACK program header when --sysv (as implied by --arm_linux) is selected. The linker will derive the executable status of the stack from the presence of the .note.GNU-stack section in input objects. The new, associated option is --[no_]execstack. [725212]
  • The C library wide-character ctype functions (isw*, towupper, towlower) are now up to date with Unicode 5.0. [726104]
  • fromelf now correctly preserves DT_RELCOUNT. [727579]

Deprecated Functionality

  • Use of the | operator as a synonym for :OR: is deprecated by the assembler as it causes problems in variable substitution in the source line. [727348]

This release includes the following corrections since RVCT 4.0 build 697:

Compiler (armcc):

  • When compiling with C++ exceptions enabled (--exceptions), function exception specifications containing reference types e.g. void g(void) throw(int&) {...}, caused a compiler internal fault. This has been fixed. [727197]
  • The documentation for --list incorrectly stated that when used with multiple source files it would generate a listing for the first file. In fact it would generate a listing for the last file, but generate the listing file name from the first source file name. The compiler now generates listings for all source files, writing each to a separate listing file whose name is generated from the corresponding source file name. [728254]
  • #pragma unroll(1) now has the correct effect on the degree of unrolling. [727935]
  • #pragma push/pop now correctly push and pop the current structure alignment as set by #pragma pack. [727532]
  • When using a custom declaration of va_list that was type-incompatible with the standard declaration of the type in stdarg.h (as given by the ARM Procedure Call Standard), the compiler would give error #256 to indicate that the type was being redeclared incompatibly when used with the --gnu option. This is now fixed. [727506]
  • In certain situations calls to fmod with arguments that would set errno were incorrectly removed. This is now fixed. [726236]
  • Functions and data marked with __attribute__((used)) are now tagged in the object to avoid removal by linker unused section elimination. [724019]
  • The compiler was optimising negated floating-point comparisons into the opposite comparison (for example !(a < b) was being converted to (a >= b)) for all Floating Point models (as set by --fpmode). This has been changed so the optimisations are only applied when the FP model indicates that we are not interested in NaNs (by default, --fpmode std, --fpmode fast). [725146]
  • A silent code generation fault where in certain circumstances at -O3 -Otime a cast from unsigned to signed integer inside a loop test was discarded has been fixed. [726234]
  • Where the compiler option --locale was used, production of a warning message could sometimes reset the current locale, causing incorrect interpretation of multibyte character sequences in source code. This is now fixed. [725074]
  • When C/C++ source code was encoded using some multibyte encodings (specifically, ones in which ordinary ASCII characters can occur as subsequent bytes of a multibyte character, so including Shift-JIS, but not UTF-8), use of the '#' stringization operator in macro expansions could produce unexpected results. This is now fixed. [725874]
  • Out-of-line instances of inline functions which have been given an explicit section attribute using __attribute__((section("name"))) could generate link time errors. This is now fixed. [723920]
  • Link-time code generation could in some cases fail to emit a symbol for a "C2" constructor or "D2" destructor. This is now fixed. [728099]
  • Use of makefile dependency generation options could unnecessarily prevent the compiler reusing precompiled header (PCH) files, with warning #629-D. The PCH files are now reused. [728897]
  • Where a friend definition in a template used a variable of the same name as a variable in the function it was called from (i.e. first instantiated from) the compiler could generate a spurious remark, if --remarks was used. This is now fixed. [728548]
  • Formerly, the compiler could fail to give dynamic linkage to an imported inline function of a dllimport class which also had a virtual function. This is now fixed. [727752]
  • Some causes of the following internal faults have been fixed:
    • 0x87ecef, 0xcc3958, 0x87ecef
    • 0xa05965, 0xbfdfa3, 0x9be513
    • 0xa85545, 0x56e87b, 0x63faa5
    • 0xafee20, 0xfe1945
    [728236, 685024,727558, 589466, 726944, 726750, 726300, 725422, 728252, 728260]

Assember (armasm):

  • A problem causing A1201E to be reported incorrectly is now fixed. [722855]

Linker (armlink):

  • The linker can miscalculate the base address of Execution Regions following 2 or more Execution Regions with the OVERLAY attribute. The problem occurs when the base address of the preceding OVERLAY Regions is not the same. This is now fixed. [725446]
  • The linker no longer reports L6967E when linking the test_mla Cortex-M3 example. [725351]
  • To better match the behaviour of the GNU tools, when --arm_linux mode is selected the linker will now keep a section if a weak reference is made to the section from a used section. [726778]
  • When reading a symdefs file containing a Thumb Symbol. The linker can produce a spurious warning: L6307W if Thumb code branches to the Symbol. This is now fixed. [726869]
  • The linker will give error message L62551 when an object contains an illegal reference to a $Sub$$Symbol or error message L6250 when there is a definition of $Super$$Symbol. If a relocation is made to either of these illegal symbols the linker will produce an internal fault 0x3ae533. The internal fault is now fixed. [726491]
  • When an object file contains a definition of $Sub$$Symbol, another object file contains a definition of Symbol and a library contains a definition of Symbol, the linker will incorrectly search the library for Symbol, load the member and end up with a Multiple Symbol Definition error. This is now fixed. [726487]
  • When invoked with --arm_linux, armlink would always report diagnostic L6029E (when a relocation in an input object file was with respect to an invalid or missing symbol) as a warning and not permit its severity to be downgraded to a remark or suppressed entirely. This is now fixed. [725951]

C/C++ Libraries:

  • The scanf family of functions used to report a parse failure when asked to parse a C99 hexadecimal float literal representing zero (e.g. "0x0.0p0"). They now parse it correctly. [726414]
  • A change made in a previous RVCT 4.0 patch release introduced a new issue whereby the C library stdio cleanup function _terminateio() would deadlock through trying to lock the same mutex twice. This is now fixed. [726232]
  • In line with the resolution of C++ Standard Library issue #109, binder1st and binder2nd in <functional> now have an additional overload of operator() taking a non-const reference. [724709]
  • An issue has been fixed concerning incorrect runtime behaviour in an uncommon use case. When rethrowing an exception, if a destructor invoked during stack unwinding rethrew again and caught the same exception object, the first rethrow would then continue incorrectly (such as restoring registers incorrectly). [728231]

Librarian (armar):

  • When armar -d is used to delete a non-existent member, the error message L6831E is now a warning. [727938]

ELF Format Convertor (fromelf):

  • The fromelf --elf copying option will incorrectly translate the Version Needed entry for a symbol definition to the global version. This can affect ARM Linux applications that access global data in shared libraries with Version Definitions. This is now fixed. [727621]
  • The fromelf option "--bincombined" used to incorrectly report an error when the uninitialized part of one ELF segment overlapped the initialised part of another. This is now fixed. [725745]

Build 650

New Enhancements in this Release

New Core Support

Changes made to improve compatibility with other toolchains

  • With Link Time Code Generation (--ltcg), if constant data in one translation unit was imported into another translation unit by an external reference not qualified as 'const', the data might have been put in a writable section. The data now always goes into a read-only section. Note that such a program does not strictly conform to C, which requires a symbol with external linkage to have consistent types everywhere it is declared. [721646]
  • The compiler's handling of filename extensions now better matches existing conventions. The extensions .ac, .tc and similar are no longer treated as C source when the --gnu_defaults option is used; instead they are passed through to the linker. Additionally .sx (and .S on Unix hosts) now indicates assembler source that needs pre-processing. [720541, 644030]
  • The compiler now supports #pragma weak. This is a deprecated language extension to mark symbols as weak or to define weak aliases of symbols, as an alternative to using the existing __weak keyword or the GCC 'weak' and 'alias' attributes. [720667]
  • The compiler now supports integer priority indications on the GNU C 'constructor' and 'destructor' attributes. Constructors with a lower priority are called before constructors with a higher priority. [722671]
  • The compiler now supports the new GCC 'pcs' attribute to specify the calling convention on targets with hardware floating-point, as an alternative to the existing __softfp keyword. __attribute__((pcs("aapcs-vfp"))) uses floating-point registers; __attribute__((pcs("aapcs"))) uses integer registers, as for __softfp. [721049]
  • In GNU mode the compiler now implements "#pragma GCC system_header". This causes subsequent declarations in the current file to be marked as occurring in a system header. This can have an effect on the severity of some diagnostics. [723702]
  • In GNU C++ mode, the compiler now allows the 'template' keyword to be omitted in certain situations where the C++ standard requires it. [722869]
  • In GNU mode, a pointer to a function is now considered to be compatible with a reference to a function for partial ordering purposes in function overload processing. Some sources that would be diagnosed as ambiguous in standard mode now compile in GNU mode. [715526]
  • Selecting --gnu_defaults mode (as implied by --arm_linux) enables --allow_null_this, giving well-defined behavior when a non-virtual member function is called on a null object pointer. [723911]
  • The compiler command line option "--gnu_defaults" option no longer implies --enum_is_int, to be consistent with typical defaults for GCC. This switch still enables --gnu, --no_debug_macros, --signed_bitfields, --wchar32, and --no_hide_all. [719559]
  • Some GCC command line translations for rare and legacy GCC options have been added. [722785]
  • When generating dependency lines for a makefile (e.g. with --md or -M) and the source is taken from standard input, the compiler will no longer generate a line in the output that gives a dependency on '<stdin>'. [723556]
  • When using multifile compilation and including the glibc math.h header, conflicts could be reported with the __fabs or __fabsf functions. This has been fixed, and no conflicts will be reported when --gnu (or another option that implies --gnu) is used. [722614]
  • The arm_linux subdirectory in the RVCT header files has now been split into arm_linux and arm_linux_compat subdirectories. The arm_linux_compat subdirectory now contains those header files required for compatibility with the glibc header files that were previously in the arm_linux subdirectory. In the ARM Linux-targeting modes --arm_linux, --arm_linux_paths and with GCC command-line translation, the compiler will prepend the arm_linux_compat subdirectory to the system include search path, and it will now append the arm_linux subdirectory to the search path. This improves compatibility with certain applications that depend on the exact include order of these files, when they are included from the glibc headers. [723765]
  • armlink now follows GNU toolchain behaviour when handling constructor/destructor sections with priorities. Prioritised constructors are now ordered in the same way as GNU in relation to un-prioritised ones and are kept by the --arm_linux switch. [722673]
  • Error L6654E is now suppressed when linking with --arm_linux, to prevent errors when linking with some GCC-compiled code. [723142]
  • The GNU linker LD has a control script that tells the linker to define symbols at various points of the ELF image. armlink used to define only the symbols needed by the ARM linux start-up code. It now defines all the symbols present in the default control script if they are referenced. The supported symbols are: __executable_start (executables only), etext, _etext, __etext, __data_start, edata, _edata, __bss_start, __bss_start__,
    __bss_end__, end, _end, __end, _bss_end__. In addition the linker will always define the symbol _DYNAMIC when there is .dynamic section. [720112]
  • A new "--undefined=<symbol>" switch has been added to the linker, which creates a reference to the specified symbol. This can be used, for example, to cause the linker to load a particular definition from a library and ensure that it is not removed through unused section elimination. The reference is created with STV_DEFAULT visibility. This matches the behaviour of the corresponding GNU ld switch. [719570]
  • A new "--undefined_and_export=<symbol>" switch has been added. This creates an STV_DEFAULT visibility reference to <symbol> in the same way as --undefined=<symbol>. If the definition of <symbol> has STV_DEFAULT or STV_PROTECTED visibility, it will also be placed in the dynamic symbol table as though an "EXPORT symbol" steering file command had been used. If the symbol has STV_HIDDEN visibility it will not be placed in the dynamic symbol table unless "--overide_visibility" is also specified. [719570]

Changes to improve tolerance to errors in input files

  • The default for the linker's --[no_]muldefweak option has been changed to --muldefweak. When multiple definitions of a weak symbol exist, this causes armlink to select the first of these rather than produce an error. [720148]
  • It is now possible to downgrade linker errors 6682 and 6683 caused by faulty string merge sections. Downgrading these will disable string merging. [719900]
  • Faulty relocations in linker input files will now produce downgradable errors rather than fatal errors.
    Downgrading the following errors will cause the relocation to be skipped: L6217E, L6286E, L6738E, L6769E, L6781E, L6923E, L6924E.
    Downgrading the following errors will cause the relocation to be processed despite the error condition: L6237E, L6241E, L6802E, L6898E
  • The linker's file write (L6002U) errors can now be downgraded to warnings for non-critical outputs. Non-critical outputs are the files specified by the --feedback, --symdef, --callgraph and --list options. [719898]
  • The linker error message "L6242E: Cannot link object <objname> as its attributes are incompatible with the image attributes" could be given when an object claims to support VFPv2 or VFPv3 yet does not have support for the VMOV d, r, r instruction needed by the ARM VFP libraries. In this situation, armlink now issues the error "L6482E: Image Attributes have no support for VMOV d,r,r and VMOV r,r,d instructions used by C-Libraries, please use the --cpu and --fpu options to select a core that supports these instructions". This error message is suppressible, which may result in the linker selecting a floating point library which uses VFPv2 instructions. [720433]

Improvements to floating point support

  • Hardware floating-point linkage is now supported for ARM Linux. However, software floating-point linkage will be used by default, including cases where a --cpu option is specified that implicitly support hardware floating-point. In order to use hardware floating point linkage when targeting ARM Linux, you must explicitly specify this with an appropriate --fpu option (e.g. --fpu=vfpv3) or --apcs=/hardfp. Note that hardware floating-point linkage is not supported by the ARM Linux ABI supplement (http://www.codesourcery.com/sgpp/lite/arm/arm_gnu_linux_abi.pdf), and the compiler will issue a warning to indicate this. [720519]
  • The following options have been added to the --library_interface command line switch:
    • aeabi_glibc_hardfp
    • aeabi_clib_hardfp
    • aeabi_clib90_hardfp
    • aeabi_clib99_hardfp
    These options cause calls to the C library (including math libraries) to use the Hardware floating-point calling convention. It is an error to use these library interfaces when compiling with --fpu=softvfp. [721565]
  • The performance of some floating-point routines in microlib has been significantly improved. [678021]

General Enhancements

  • Support for Windows 7
  • Intrinsics have been added to the compiler for __smladx, __smlaldx, __smlsdx, __smlsldx, __smuadx and __smusdx, with the same signatures as the existing intrinsics such as __smlad. These generate the 'X' variants of the instructions, with the half-words swapped in the relevant operand. [721831]
  • Vectorisation has been improved, enabling some loops to be vectorised that previously could not be. [670517]
  • The compiler now passes the option --[no_]hide_all through to the assembler when invoking it on assembler sources or embedded assembler. This sets the default visibility for symbol when using dynamic linkage. [512423]
  • It is now possible to declare an embedded assembler function as static. Previously, declaring an __asm function as static would cause error #1122, or internal error 0xafc2db when 'static' occurred on a separate prototype. [720153]
  • A new compiler option --[no_]rtti_data has been added, to control the generation of C++ RTTI data. The option --no_rtti only disables source-level RTTI features such as dynamic_cast, while --no_rtti_data disables both source-level features and the generation of RTTI data. When using GCC translation, -fno-rtti implies --no_rtti_data. [721182]
  • The compiler has a new option -P. This performs preprocessing of the input without compilation, as with -E, however this option does not generate line markers in the preprocessed output. This might be used when preprocessed output is to be parsed by another script or utility. [719509]
  • The compiler now accepts input from character devices such as /dev/null. Formerly these would be faulted as invalid. Note that the --compile_all_input option will normally be required to have such names treated as source. [723224]
  • A new linker switch "--export-dynamic" is now available, which exports non-hidden symbols only if there is a dynamic segment already in the image. This is in addition to the switch "--export-all" which cannot be used to produce a statically linked image because it will always export non-hidden symbols, forcing the creation of a dynamic segment. [720121]
  • The linker will now warn when IMPORT or EXPORT commands in a steering file can not be applied because the --override_visibility switch has not been specified on the command line. [677320]
  • When creating a shared library, the --symbolic option is used to prevent the dynamic loader from overriding global definitions within the shared library. armlink now takes advantage of this knowledge and does not create a PLT entry for references coming from the same library. [721954]
  • armlink now accepts C-style multi-line comments in its symver scripts and scatter files. [720472]

RVCT 4.0 patch build 650 includes the following corrections and improvements since RVCT 4.0 build 591:


  • The compiler now has an option --[no_]type_traits_helpers to enable support for type traits helpers like __is_union and __has_virtual_destructor. The helpers were enabled in non-GNU C++ mode by default, and were also enabled when emulating g++ 4.3 or later. The only change is to provide this option to allow the default to be overridden. [721045]
  • A problem has been fixed with code generated for switch statements when using profile-guided optimization. [720056]
  • In some situations the compiler would incorrectly re-use the base register of a load, causing the offset of a subsequent load to overflow, which has now been fixed. [720891]
  • In GNU C mode, static tables of relative label offsets of the form "&&a - &&b" could contain incorrect data. This is now fixed. [721194]
  • Fusing nested loops can result in an upper bound that exceeds the datatype limit. In some circumstances, the compiler failed to avoid this situation, which has been fixed. [722205]
  • Passing a char array as the format string argument of a printf function whose return value is used would incorrectly cause the symbol _scanf_wstring to be referenced. This has been fixed. [723780]
  • printf will no longer be linked in if all sections containing a call to it have been removed by unused section elimination. [667818]
  • Previously, attempting to use the symbol rename keyword __asm("name") on the prototype of an embedded assembler function did not work, because the embedded assembler would use the original C name. This is now fixed: the supplied assembler name is used. [721806]
  • C++ exceptions generation could provoke a crash in a situation where a switch statement occurred in the lifetime of a local variable of class type with an empty destructor body. This is now fixed. [721019]
  • C++ class methods declared inline (either implicitly or explicitly) and that were placed in named ELF section, could produce linker failures when compiling with DWARF2 Debug information (--debug --dwarf2). This has been fixed. [723369]
  • Some causes of the following internal faults have been fixed: 0xe664d6, 0xfc68b8, 0x87ecef, 0xafee20, 0x9f28b9 & 0x0d9491 [720108, 722435, 722511, 722766, 723231 & 723245]


  • Improved the accuracy of detection of A1546W for MOV and MVN instructions with SP as destination register. [720034]
  • SRS with an invalid mode number is now an error. You can use --diag_warning=1584 to get previous behaviour. [720203]
  • Assembler no longer accepts and produces invalid code for NEON VSHL and VQSHL instructions with immediate shift equal to the size of the data type. [719812]
  • YIELD, WFE, WFI and SEV are now diagnosed as behaving as NOP (diagnostic 1807) on ARM1136-rev1 and ARM1176. [719465]
  • Improved architectural diagnosis of unpredictable instructions in disassembly. [720255]
  • Assembling a pc-relative LDRD on a not word-aligned offset in ARMv7-M is now diagnosed unpredictable. [720720]


  • Fixed a problem with steering files that contain both IMPORT * and EXPORT *. armlink will no longer give the error message Error: L6279E: Ambiguous selectors found for ('IMPORT *' and 'EXPORT *'). [719859]
  • The RENAME symbol command in linker steering files will no longer rename a Lib$$Request symbol entry, as this would break library searching. [719736]
  • armlink no longer erroneously produces "Error: L6236E: No section matches selector - no section to be FIRST/LAST." for scatter files when --no_veneershare is selected. [720539]
  • armlink --show_cmdline now shows input object files and libraries as in earlier releases. [720197]
  • The linker could lose ZI sections when using __AT sections that are assigned to Execution Regions that contain both RW and ZI sections. This has now been fixed. [720096}
  • Partial linking object files could lose the SHF_STRINGS flag of a Section that is also part of a Group. If the partial object is used in a subsequent link and the group containing the section is selected then the linker would issue error L6883E. This is now fixed. [720254]
  • In some cases an ELF object produced by GCC can have a relocation to the symbol at index 0. This is usually an error by the object producer so armlink displays error message L6029 unless the relocation is of type R_ARM_V4BX. When partial linking with this error downgraded (or using objects with R_ARM_V4BX relocations) an internal error can occur. This has now been fixed. [721112]
  • The linker now supports the option --[no_]merge_partial_comdat that controls whether SHF_COMDAT groups are merged when partial linking. [720884]
  • If the linker could not place a veneer close enough to the call site due to large ELF section, the linker could loop infinitely trying to generate veneers for the section. This is now fixed. [720424]
  • The linker could crash if an input object contains an invalid VFE Section. This has been fixed, and the error messages for invalid VFE information (L6643, L6644, L6645, L6656) can now be suppressed. If the linker encounters an error and the message has been suppressed it will switch the VFE optimisation off, which is the equivalent of using the --vfemode=off switch on the command line. [720128 & 719899]
  • The linker could underestimate the size of the GOT section when linking with --sysv (as implied by --arm_linux) when a TLS relocation R_ARM_TLS_LDM32 is present in the image. This may cause problems when the relocation is resolved, either by the dynamic linker, or by armlink when statically linking. This has now been fixed. [723207]
  • A problem could occur when linking an application against a shared library that contains a weak-alias for a global data symbol, and both the library and the application refer to the weak-alias. For the application the linker must import the non-weak symbol at the same address as the weak alias, and must re-define and export the weak-alias as a definition. This will allow both the application and the library to use the same copy of the data item. Previously, the weak-alias was not exported from the application so the library and the application use different copies of the data. This has now been fixed and armlink will export the weak-alias. [720795]
  • L6260E could be generated when automatically placing .ARM.__AT sections whose base address + size is greater than 0xFFFFFFFF. This is now fixed [721272]
  • When using microlib under certain conditions, the linker could incorrectly generate the error "Fatal error: L6787U: Region table handler '__scatterload_null' needed by entry for ER_DECOMPRESS was not found". This has now been fixed. [723439]
  • Link Time Code Generation (--ltcg) could sometimes fail on Windows hosts when a large number of inputs were used, due to limits on subprocess command line length. This is now fixed.
  • The linker can now merge strings section where the address has been generated by a MOVT and MOVW instruction sequence. Previously the linker would generate warning L6412W, and disable string merging for the section containing the unsupported relocation. [720759]


  • The program exit code passed to exit() or returned from main() did not reliably find its way to the underlying _sys_exit() function. This has been fixed. [722485]
  • When using the real-time heap in a multithreaded program, malloc() was not releasing the heap mutex in the case where it returned failure. This has been fixed. [722557]
  • The C++ runtime library function __aeabi_vec_ctor_cookie_nodtor was implemented incorrectly, and has been corrected. [713271]

ELF Format Convertor (fromelf):

  • "fromelf --elf" incorretly removed any file offsets inserted by the linker. It now maintains file offsets specified by the p_align ELF field [720261]

Build 591

New Enhancements in this Release

New Target Support

  • Core support for the Cortex-M0 processor (--cpu=Cortex-M0).
  • Device support for i.MX51 and OMAP4xxx. A complete list of supported devices can be generated typing "armcc --device list" (without quotes) at the command line.

Improved Floating Point Math Library

The single-precision C math functions (sinf, logf, powfetc.) have been reimplemented for better speed, accuracy and monotonicity, and to make more efficient use of hardware floating point (VFP) when available. The new implementations are expected to be 2-4 times faster on targets without VFP hardware, and 5-10 times faster on targets with VFP hardware.

Expanded gcc Compatibility

  • We have added a "--gnu_defaults" option. This sets basic default behaviour similar to that found in GCC, where these are common to most ARM GCC configurations but excluding any platform-specific settings such as those targeting ARM Linux. In particular, the --gnu_defaults option will enable the following: --gnu, --no_debug_macros, --enum_is_int, --signed_bitfields, --wchar32, and --no_hide_all. The --gnu option behaviour remains the same; it enables GCC language extensions, without changing other settings from their armcc defaults. The --arm_linux option, and other ARM Linux-targeting options, imply --gnu_defaults and also the platform-specific settings for Linux.
  • When configured against GCC 4.3.1 or later and using GCC command-line translation for ARM Linux, the compiler will enable NEON vectorization automatically at -O3 (RVDS Professional only). You can explicitly enable or disable vectorization using the GCC options -ftree-vectorize or -fno-tree-vectorize.
  • The header files arm_linux/linux_rvct.h and arm_linux/limits.h now define MB_LEN_MAX as 16 (the value expected by glibc) rather than 6 (the ABI-recommended value).
  • The linker error message "Error: L6029E: Relocation #REL:0 in object.o(section) is wrt invalid/missing symbol "is now downgraded to a warning when --arm_linux is used. This enables the link to complete with GNU objects that contain invalid relocations to NULL.

General Enhancements

ARM Compiler (armcc):

  • Array object destructions have been updated to use the more efficient ABI function __aeabi_vec_dtor, instead of function __cxa_vec_dtor.
  • The compiler now issues a remark for empty dependent statements, which are often triggered by incorrect placement of semicolons.
  • The formatting of long strings and 64 bit data directives has been improved in the interleaved assembly output.

Linker (armlink):

  • The --ltcg option has been enhanced to support multiple input objects containing entry points. Note: if the input objects do contain more than one entry point then you must select one using the --entry=entrypoint command. Note, as the --ltcg option loses the mapping between object and section you must use a global symbol definition as your entry point. For example --entry=__rt_entry.
  • We have added a new linker option "--[no_]implicit_branchpatch" (on by default), that controls whether armlink will automatically add patches based on other command line options. For example, if --cpu=cortex-a8 is specified, the --branchpatch=cortex-a8_q109 option may be implied.
  • The new option "--[no_]keep_protected_symbols" (on by default) prevents sections containing symbols with STV_PROTECTED visibility from being removed.
  • We have added the capability to suppress mismatched PRES8/REQ8 build attribute warnings. Previously, when using --arm_linux, the linker downgraded errors about mismatched PRES8/ REQ8 build attributes to warnings to maintain compatibility with GNU objects that lack these attributes. The user may now suppress these altogether using "--diag_suppress=6238" for example.
  • For cases where customers have their applications export functions shared objects, we have provided an option that will prevent the "remove unused sections" linker feature from removing these desired functions.

Multiple tools:

  • On Windows, the tools can now accept Cygwin paths. The 'cygpath' program from the Cygwin command set is invoked as a filter to convert path strings where necessary. To enable this conversion, CYGPATH environment variable must contain the full absolute Windows path and name of a suitable cygpath.exe, e.g. "CYGPATH=C:/cygwin/bin/cygpath.exe".
  • A new switch, --version_number, outputs the version and build number in an easy to parse format.
  • The options --apcs=/softfp and --apcs=/hardfp are now available as an alternative way to request the integer or floating-point variant of the procedure call standard. This allows the procedure call standard to be specified separately from the version of the floating-point hardware available through the --fpu option. It is still possible to specify the procedure call standard in the --fpu option as before, but the use of --apcs is recommended.
  • The tools now allow --fpmode=none, as an alternative to --fpu=none, indicating that source is not permitted to use floating-point arithmetic of any kind.

Fixes in this Release

RVCT 4.0 patch build 591 includes the following corrections since RVCT 4.0 build 529:

Compiler (armcc):

  • With --wchar32, wide character string literals generated for references from structure initializers are now placed in a section with 4 byte alignment, ensuring correct alignment.
  • Floating point options on the command line now correctly override earlier options when using GCC command line translation.
  • In some cases when a 64-bit unaligned value was loaded and then only partially used, the compiler would incorrectly generate an unaligned word load instruction. This has been fixed.
  • When compiling with "--cpu QSP" a SWP instruction could sometimes be reordered incorrectly. This has been fixed.
  • The inline assembler could incorrectly optimize a MVN with a shifted operand into a plain shift with no negation. This has been fixed.
  • An issue has been fixed where the compiler could fail to maintain 8 Byte stack alignment for variadic functions
  • An issue has been fixed where using the combination of --sys_include and --preinclude could result in the compiler failing to find included files.
  • Function arguments are now set up correctly where a function's return is assigned to a variable.
  • In cases where the RTTI for a derived class needs to refer to RTTI for a base class, and the base class is marked dllimport, the compiler now defines the base class RTTI unless it can determine that it will be exported from some other translation unit.
  • Some causes of the following internal faults have been fixed: 0x5ac887, 0x87ecef, 0xafee20, #2409, 0xc31b6d, 0x6bca8b, 0x19c380
  • A possible crash related to the loop unrolling optimization has been fixed.
  • A possible crash when a destructor in a derived class contains a try-block, and the base-class destructor is defined as an empty function is fixed.

C Libraries:

  • Defining __user_heap_extend in user code could lead to a link error due to a duplicate symbol definition in the library. This has now been fixed.

Assembler (armasm):

  • The {ARCHITECTURE} built-in variable now has the value of the chosen target architecture when--arm_only is used
  • The .F16 data type is now accepted as an alternative to .16 data types on NEON instructions
  • The assembler now correctly handles VLDM/VSTM instructions with more than 16 single-precision registers.
  • LDM instructions used to return from exceptions in ARM state with LR and PC in the register list (e.g. LDMFD sp!, {r0-r12, lr, pc}^) no longer generate "Warning: A1745W: This register combination is DEPRECATED"

ELF format converter (fromelf)

  • fromelf --elf no longer reports an internal fault when handling Linux images containing INIT_ARRAY, FINI_ARRAY or PREINIT_ARRAY sections.
  • fromelf now correctly disassembles Thumb2EE code.

Librarian (armar):

  • When armar is given two input files with the same name, in replace (r) mode, the second file will now not replace the first.

Linker (armlink):

  • The linker generates extra linker defined symbols:
    • Load$$region_name$$ZI$$Base Load - Address of the ZI output section in this execution region.
    • Load$$region_name$$ZI$$Length Load - Length of the ZI output section in bytes.
    • Load$$region_name$$ZI$$Limit - Load Address of the byte beyond the end of the ZI output section in the execution region.
  • The Load Length of ZI will be 0 unless region_name has the ZEROPAD scatter-loading execution region attribute set. If ZEROPAD is set then Load Length = Image$$region_name$$ZI$$Length"
  • When the target architecture is ARM-only or Thumb-only, armlink no longer reports an error if an interworking section takes the address of a non-interworking section.
  • "Warning L6765W : Shared object entry points must be ARM-state when linking architecture 4T objects." is no longer produced for ARM-state symbols.
  • armlink now works correctly when --arm_linux, --ltcg and --library=<lib> command line options are used together.
  • The scatter-loading region attribute ALIGN is now taken into account when writing the sh_addralign field of the first output section that is derived from the execution region. ALIGN on a load region will also now set the p_align filed of the associated program header.

Build 529

RVCT 4.0 patch build 529 includes the following corrections and improvements since RVCT 4.0 build 471:

Compiler (armcc):

  • A new "--version_number" switch has been added. In contrast to --vsn, --version_number just reports the simple 6-digit compiler version string only (e.g. 400529) and does not check-out a license. This is intended for use by build systems which need to check the version of RVCT being used.
  • A new "--visibility_inlines_hidden" switch has been added. This stops inline member functions acquiring dynamic linkage ('default' visibility) from class __declspec(dllexport), from a class visibility attribute, from #pragma GCC visibility, or from --no_hide_all. It does not affect non-member functions.
  • The "--export_all_vtbl" switch now causes construction vtable tables (_ZTT*) to be exported if and only if the corresponding vtables are exported.
  • The compiler will no longer add the __hardfp_ prefix to math functions, e.g. sin(), defined in user code when user is not using the RVCT library interface.
  • The macro __FILE__ can now be redefined on the command line. For example, "-D__FILE__= __MODULE__" causes __FILE__ to give the file name but without path information.
  • The compiler now sets Tag_ABI_FP_exceptions in full IEEE mode (--fpmode= ieee_full)
  • In GNU C mode, the compiler now places uninitialized global const objects in writable storage, on the assumption that they are being (dynamically) initialized by other means. This applies to definitions such as: int const n;
    Note that in --relaxed_ref_def mode, which is the default in GCC command-line translation mode, such a definition would be common.
  • Translation of a GCC command line containing -MD, without an explicit dependency file location given with the -MF switch, would always be incorrectly placed in the current working directory.
    The dependency file is now produced in the same directory as the output object file.
  • The compiler now supports the GCC "__attribute__ ((destructor))". This puts a reference to the routine into a SHT_FINI_ARRAY section. "__attribute__ ((constructor))" was already supported.
  • The GCC 'weakref' attribute on variables and functions is now correctly implemented.
  • Some improvements have been made for configuring armcc for GCC command line translation against an existing GNU toolchain, in particular to support configuring GCC for the Google Android based platforms.
  • __declspec(dllexport) on a class now causes the typeinfo name variable (_ZTS...) to be exported, along with other RTTI information.
  • The previous RVCT 4.0 patch build 471 caused a diagnostic to appear when a member of a class marked 'dllexport' was defined outside the class, without 'dllexport'. As the 'dllexport' is implicitly applied to the member function in this situation, the diagnostic was inappropriate and is no longer produced.
  • Absolute-address ZI variables (AT extension) are now correctly placed in ZI data sections rather than in RW data sections.
  • Some optimization improvements have been made, for example:
    • To improve performance on processors with long pipelines by replacing pointers to functions with if/else conditional branches.
    • Generation of the USAT instruction has been improved at -O3 -Otime.
  • The output of the __builtin_parity intrinsic has been corrected. Previously the parity was in the least significant bit of the result. The intrinsic now returns just the 0 or 1 parity bit.
  • Some spurious occurrences of compiler warning #128-D "loop unreachable from preceding code", when the loop body was entered via a goto or switch case, now no longer occurs.
  • In certain rare cases the compiler could crash when an integer subexpression divided the minimum negative number (i.e. INT32_MIN) by -1, causing overflow. This is now fixed.
  • Inlining of a function that returned a volatile object where the return result was not used could result in the load of the volatile object being removed. This is now fixed.
  • The compiler could generate a configuration file for ARM Linux that was missing a path to the C++ header files, when running on Windows. This is now fixed.
  • Use of zero-sized data items (a GCC extension) in GCC command line translation mode, or more generally with --bss_threshold=0, could result in an internal fault 0x6e3f3b. This is now fixed.
    These data items now reserve one byte of zero-initialized store (BSS).
  • Some causes of the following internal faults have been fixed: 0x265580, 0x6e3f3b, 0x87ecef, 0xb36758, 0xc31b6d, 0xc18024, 0xd24575, 0xdb2e1f,
  • On Windows, when the compiler invoked the linker as a subprogram, in certain cases where both the path to armcc and the path to files passed to the linker contained spaces, the invocation would fail with a message such as "'C:\Program' is not recognized... ". This is now fixed.

C/C++ Libraries:

  • To assist linking with some applications and libraries, the C library now defines __errno as an alias of __aeabi_errno_addr, providing a way to obtain the address of the errno variable. The C prototype is "int *__errno(void)".
  • The stack pointer (SP) is now initialized by Microlib before use of the RW data decompressor.
  • atan2f() has been corrected to return NaN when its input parameters are +0/-0.
  • modf() has been corrected to return NaN when the first input parameter is NaN.

Assembler (armasm):

  • Cases where use of the EXTERN directive could result in a corrupt object file has been fixed.
  • Labels defined in an empty AREA will now always have their type derived from the type of the AREA.

Linker (armlink):

  • armlink is able to workaround Cortex-A8 Erratum 657417, which affects 32-bit Thumb-2 branch instructions that code two 4K regions, where the target address is in the first 4K region. The workaround is activated if either:
    1. The armlink command-line switch --branchpatch=cortex-a8_q109 is used, or
    2. The armlink command-line switch --cpu=cortex-a8 is used and a full link is being performed.
    This only needs to be used for Thumb-2 code intended to be run on Cortex-A8 revision r3p0 or most earlier parts. Please contact your silicon vendor for more information on this erratum.
    When activated the linker will scan for instruction sequences that may trigger the erratum behaviour. If such a sequence is found the linker will insert a patch to prevent the erratum behaviour. Use the "--info patches " switch to be informed of the Object, Section and the Offset within the Section where the patch has been applied.
    The trigger conditions that the linker looks for are:
    1. A 4-byte direct Thumb-2 branch instruction codes a region boundary, i.e. (address & 0xffe) == 0xffe.
    2. The branch instruction is backwards and has a range of less than 4KB.
    3. The instruction preceding the branch is a 4-byte non-branch instruction.
    The linker patch converts the backwards branch to a forwards branch to a patch at the end of the Section. The patch consists of a backwards unconditional branch to the original target. The patch is aligned such that the backwards branch can never code a region boundary.
    The restrictions are:
    1. When partial linking the linker does not always have the address information to know that an address will never be placed on a region boundary. This will mean that the linker may patch more instructions in a Section than if the patch were applied in a full link.
    2. A branch that requires patching must be able to reach the patch at the end of the Section. If the linker is unable to place the patch within range of the branch it will give a warning message. The range of a Thumb-2 unconditional branch is 16MB and the range of a conditional branch is 512KB so this is unlikely to happen in practice.
    3. The linker will increase the alignment of any Program Segment containing a patch to 4KB.
  • A new "--use_definition_visibility" switch has been added. By default when the linker combines global symbols the visibility of the symbol will be set the strictest visibility of the symbols being combined. So a symbol reference with STV_HIDDEN visibility combined with a definition with STV_DEFAULT visibility will result in a definition with STV_HIDDEN visibility. When --use_definition_visibility is set the linker will use the visibility of the definition in preference to the visibility of a reference when combining symbols. So a symbol reference with STV_HIDDEN visibility combined with a definition with STV_DEFAULT visibility will result in a definition with STV_DEFAULT visibility. This can be useful when you want a reference to not match a Shared Library, but would like to export the definition. Note that
    --use_definition_visibility violates the ELF standard, hence it is off by default.
  • A new "--remarks " switch has been added that enables some diagnostic messages, which are suppressed by default. These extra diagnostic messages will warn for:
    • Use of the helper library, which is no longer required for objects that are built entirelyfrom the 4.0 version of armcc.
    • Use of --fpic when an object has not been compiled with --apcs=/fpic or --apcs=/ropi.
    • Some cases when RW compression has been turned off.
    • A mapping symbol ($a, $t, $d...) that has an address outside the section.
    • When a symbol cannot be imported/exported into/from the dynamic symbol table via IMPORT or EXPORT commands in steering files.
  • armlink when operating with --sysv has added in extra Sections in the output ELF file for:
    • .init
    • .fini
    • .ARM.exidx
    • .preinit_array
    • .init_array
    • .fini_array
    In previous versions these Sections were assigned to either the .text or .data Section.
  • The linker now assigns unassigned sections to .ANY execution regions as documented, i.e. the largest section is first assigned to the execution region with the most available space, and so on.
  • The linker's behaviour with respect to weak-references and dynamic linking has changed. The new behaviour is:
    • For --sysv: Unresolved weak-references can now be placed in the dynamic symbol table via an IMPORT directive in a steering file.
    • For --bpabi: The linker will only allow weak-references in the dynamic symbol table if the symbol is defined by a DLL supplied on the command line. An unresolved weak-reference cannot be placed in the dynamic symbol table via an IMPORT directive.
  • A problem with ARM/Thumb synonym processing in the presence of anonymous global symbol definitions has been fixed.
  • A problem has been corrected which caused the 4.0 armlink --info=debug switch to report less duplicate debug information than RVCT 3.1.
  • Linker now correctly diagnoses an Execution Region containing exactly two Sections marked +FIRST.
  • armlink --match=crossmangled no longer crashes when there are no symbols with a C++ mangled name in the image.
  • armlink now correctly handles R_ARM_V4BX relocations with no target symbol from sections in a rejected comdat group.

ELF Format Convertor (fromelf)

  • "fromelf --strip debug,symbols" now fully strips out the symbol table (.symtab) and string table (.strtab ).

Build 471

RVCT 4.0 patch build 471 includes the following corrections and improvements since RVCT 4.0 build 400:

Compiler (armcc):

  • The compiler now works around Cortex-M3 erratum 602117 involving LDRD when the base register is also the first loaded register. The C/C++ libraries have also been rebuilt to avoid these instructions.
  • Some code size and performance improvements have been made to the Profile Guided Optimization mechanisms.
  • Some code-generation and optimization improvements have been made for NEON compilation.
  • Some compatibility improvements have been made when compiling for --gnu and --arm-linux, for example:
    • The compiler now correctly translates the -mfpu=neon and -fno-inline options in gcc translation mode.
    • Better approximate translations for the GCC floating-point optimization options have been added.
    • Some aliases for GCC command-line options were not correctly translated
    • The compiler now correctly recognises glibc setjmp variants with --library_interface=aeabi_glibc and generates correct code in the presence of these calls.
    • The compiler did not correctly allow default symbol visibility to be overridden in ARM Linux modes.
    • The gnu __builtin_va_... functions are now implemented
    • When configuring the compiler for ARM Linux based on an existing GNU toolchain all paths are now checked for libraries that were specified by name only.
    • The GNU builtins __builtin_powi, __builtin_powif and __builtin_powil are now translated correctly.
  • Some corrections have been made to the DWARF debug information generated by the compiler.
  • Some further TI C55x intrinsics have been added into c55x.h.
  • The compiler can now generate code that will catch a bad_typeid exception thrown from use of the typeid operator.
  • For embedded assembler (__asm) functions marked as __weak, the compiler no longer generates a weak reference from C code, to ensure the definition is not lost. A weak symbol is still generated in the assembler output.
  • In addition to recognizing files with extension .i as preprocessed C source (i.e. source for which preprocessing should be suppressed), the compiler now recognizes .ii as indicating preprocessed C++ source.
  • Some code generation issues have been addressed.
  • The compiler is now able to recognise more opportunities to use PKHTB instructions with ASR shift and PKHBT instructions with LSL shift.
  • The compiler now generates LDRD/STRD for volatile accesses of 64 bit data types.
  • The use of __declspec on classes is no longer ignored.
  • Some possible causes of the following internal faults have been fixed:
    0x15f950, 0x298170, 0x3dd550, 0x44784c, 0x4ccb3b, 0x9c3725, 0x974f57, 0xafee20, 0xeeed90, 0xf28d9c.

C/C++ Libraries:

  • The variant of float.h provided for use with ARM Linux in the $RVCT40INC/arm_linux directory has been changed. By default, this defines FLT_ROUNDS to 1 meaning round-to-nearest, and this corresponds to GCC behaviour. However, this is not in strict accordance with ISO C. To conform to the standard, the FLT_ROUNDS must expand to an expression whose value changes with the floating point environment. An alternative definition of FLT_ROUNDS is provided if you need this strict ISO C behaviour. This is enabled by defining the macro __ARMCC_STRICT_FLT_ROUNDS when compiling your source code. This variant of the macro uses a call to fegetround(), so you must link with the glibc math library (libm.so or libm.a) if you use this variant.
  • The variant of float.h provided for use with ARM Linux incorrectly referred to __ieee_status().
  • arm_neon.h no longer defines __const defined as a macro, which prevented it from being used as a synonym for const in --gnu mode.
  • A wrapper for the glibc header file sys/cdefs.h has been added to $RVCT40INC/arm_linux. This is to avoid use of the GCC 4.3 builtins __builtin_va_arg_pack and __builtin_va_arg_pack_len, which are not supported by armcc.
  • In the STL implementation supplied with RVCT, <list> and <vector> could sometimes fail to propagate an exception thrown by an allocator. This is now fixed.
  • _Bool is no longer predefined in C++ mode, as this breaks C++ code that helpfully uses "typedef bool _Bool;". It is still defined in C mode, as documented.

Assembler (armasm):

  • A new --cpu option for v7-A + Security Extensions has been added ("--cpu=7-A.security") which allows the use of SMC (formerly SMI) instruction when assembling for the v7-A architecture.
  • A regression in the behaviour of armasm --diag_warning=1722 to downgrade the error for labels in IT blocks when assembling for Thumb-2 has been fixed.
  • Conditional BKPT instructions are now faulted within Thumb IT blocks because BKPT is always unconditional only.
  • The assembler no longer incorrectly diagnoses some valid ARM data-processing instructions as unpredictable or deprecated.
  • The assembler is now able to warn if an ATTR directive has not been applied.
  • A problem with the use of RELOC with a symbol defined by EQU has been fixed.

Linker (armlink):

  • "Linker feedback" was failing with main() being reported as unused because the call from the C library initialization code to main() was not being detected. This is now fixed.
  • The linker's callgraph output could show a called function as being "unused" when there were non-branch relocations in the section and more than one symbol at the same address as the destination symbol. This has been fixed.
  • The linker callgraph now correctly detects tail-calls that have been transformed into a nop by the linker. Previously these calls could be missed which would cause the tail-called function to be marked as unused.
  • Sections from object files containing a "." are now handled correctly in scatter-files, for example, "foo.bar.o" no longer matches with "foo.o".
  • The linker can now generate warning L6784E when data extends to outside the given section.
  • The linker is now able to report error L6221E for execution regions in scatterfiles which overlap with other regions (such as OVERLAY regions) that do not have region table entries.
  • armlink Internal fault 0xb4652d no longer occurs when the presence of ARM or Thumb code in the input objects does not match the Architecture derived from the Build Attributes of the image.
  • When building Linux applications, .note.ABI-tag SHT_NOTE sections from objects are now processed in the same way as .note.ABI-tag sections from shared objects.
  • A new command line option --gnu_linker_defined_syms has been added. This option is enabled when --arm_linux is in use, otherwise it is off by default.
    When this option is on the linker will support the GNU equivalent of Input section symbols:
    __start_SectionName (RVCT Equivalent= SectionName$$Base) - Address of the start of the consolidated section called SectionName.
    __stop_SectionName (RVCT Equivalent= SectionName$$Limit) - Address of the byte beyond the end of the consolidated section called SectionName
    Note that a reference to SectionName by a GNU input section symbol is sufficient for armlink to prevent the section from being removed as unused. A reference by a RVCT input section symbol is not sufficient to prevent the section from being removed as unused.
  • A new command line option --[no_]add_shared_references has been added. This option is enabled when --arm_linux is in use, otherwise it is off by default.
    This option affects the behaviour of the --sysv mode. If --add_shared_references is set then when linking an application the linker will add references from shared libraries. The linker will give an undefined symbol error message if these references are not defined by the application or by some other shared library. These references can be satisfied by static 'ar' format libraries.
    Note: A reference from a shared library can only be satisfied by a symbol definition with protected or default visibility, as these are the only symbols that can be exported into dynamic symbol tables. The linker will give an error message if the symbol reference is resolved by a symbol with hidden or internal visibility.
  • A default visibility symbol that is given a local symbol version by a symbol versioning script, is no longer exported to the dynamic symbol table unless it is required for relocation. In previous armlink versions, the symbol would be exported with a local version.
  • For each shared library that a program depends on the linker will add a DT_NEEDED tag into the dynamic segment. A program loader such as ld.so will read these dependencies and automatically load these shared libraries. The order that the libraries is loaded in is sometimes significant so the linker will match the order of DT_NEEDED tags with the order the libraries appear on the command line. In the release version of 4.0 this order can sometimes come out incorrect with the library intended for position 2 in the list coming in position 3. This should only be significant if the library in position 2 needs to preempt symbols in the library in position 3. This problem has now been fixed.

ELF Format Convertor (fromelf):

  • "fromelf --compare sections" no longer fails with Internal fault 0x0ad3f4 when comparing two files whose zero-initialised data sections differed in length.
  • An issue in fromelf which resulted in a crash when processing libraries (containing multiple objects) has been resolved.
  • fromelf -ec on executable images now shows correct offsets in references from exception tables to code.
Download Download (Login Required) EULA included in archive


We use cookies to give you the best experience on our website. By continuing to use our site you consent to our cookies.

Change Settings

Find out more about the cookies we set