Sourcery G++ Lite Release Notes

This section documents Sourcery G++ Lite changes for each released revision.

Changes in Sourcery G++ Lite 2007q1-10

Disassembly of overlapping sections.  A bug in the disassembler that caused code to be displayed as data (and vice-versa) in files with overlapping sections has been fixed. This mainly affects the objdump utility.

Marvell Feroceon support.  Sourcery G++ Lite now generates code optimized for Marvell Feroceon CPUs when the mcpu=marvell-f option is specified. This option also selects runtime libraries optimized for this processor.

Fix --gc-sections and C++ exceptions.  A bug in the --gc-sections linker option has been fixed. Previously this would incorrectly remove unwinding tables, breaking C++ applications that use exceptions.

Installer hangs while refreshing environment.  The Sourcery G++ installer for Microsoft Windows now updates the PATH environment variable without waiting for open applications to acknowledge the update. This change prevents open applications from blocking the installer's progress.

Improved assembler diagnostics for 8-bit offsets.  The assembler now correctly diagnoses out-of-range offsets to instructions such as LDRD as 8-bit rather than half-word offsets.

Less disk space required for installation.  Sourcery G++ Lite packages are smaller because multiple copies of files have been replaced with hard and/or symbolic links when possible. Both the size of the installer images and the amount of disk space required for an installed package have been reduced.

Thumb register corruption fix.  A bug in the compiler that could cause register corruption in Thumb mode has been fixed. The compiler was formerly emitting code to restore registers on function return that was not interrupt safe.

__aeabi_lcmp.  An error in the libgcc implementation of __aeabi_lcmp that caused incorrect results to be returned has been fixed. This is a support routine defined by the ARM EABI. GCC does not normally use this routine directly, however it may be used by third-party code.

The \@ assembler pseudo-variable.  A bug in the assembler that caused uses of the \@ pseudo-variable to be mis-parsed as comments has been fixed.

Assembly of SRS instructions.  An assembler bug that resulted in incorrect encoding of the Thumb-2 SRS instruction has been fixed. In addition the assembler supports explicit specification of the base register, as accepted by other ARM toolchains.

Symbols defined in linker scripts.  A bug is fixed that caused the linker to crash in some circumstances when a linker script defined a symbol in an output section. Typically usage is where the script contained a __DATA_LOAD = LOADADDR(.data) statement in the .data section.

Crash when generating vector code.  A bug that sometimes caused the compiler to crash when invoked with the -ftree-vectorize option has been fixed.

VFP disassembly crash.  A bug that caused crashes when disassembling some forms of the VFP fmrx and fmxr instructions has been fixed.

ARM NEON store intrinsics bug fix.  A compiler bug that incorrectly caused calls to ARM NEON store intrinsics (such as vst1_u8) to be optimized away has been fixed.

Improvements to ARM NEON support.  The ARM NEON support in GCC has been enhanced to comply with new rules for containerized vector types specified in the ARM procedure call standard. Additionally, the compiler now rejects implicit conversions between NEON polynomial vector types and NEON integer vector types of the same layout.

Propagation of Thumb symbol attributes.  Symbols referring to Thumb functions on ARM targets now have their Thumb attribute correctly propagated to any aliases defined with .set or .symver.

Complex numbers bug fix.  A bug that could lead to incorrect code generation for code using complex numbers has been fixed.

Use of system header and library directories diagnosed.  The compiler and linker now diagnose the incorrect use of native system header and library directories for cross-compilation. This typically arises from options such as -I/usr/X11R6/include hard-coded in build scripts written without a view to cross-compilation.

Linking of non-ELF images.  A linker bug that could cause a crash when linking non-ELF objects for ARM targets has been fixed.

Initialization priorities.  The constructor and destructor function attributes now accept an optional priority argument. Constructors with small priorities are run before those with larger priorities; the opposite is true for destructors. For example:

void f __attribute__((constructor(500)));
void f() {
  /* Perform initialization.  */
}
	   

defines a function f with priority 500. This function will be run before constructors with larger priorities. Constructor and destructors with no explicit priority argument have priority 65535, the maximum permitted value.

Thumb-2 IT block code generation error fixed.  A bug in Thumb-2 code generation has been fixed. This bug would result in missing IT instructions, causing the assembler to reject the code.

ARM Cortex-R4 performance improvements.  Sourcery G++ Lite now generates faster code when compiling for the ARM Cortex-R4 processor by scheduling instructions for the processor's pipelines. To generate code for this processor, use the -mcpu=cortex-r4 command-line option.

Invalid load instructions.  A bug in the compiler which caused it to generate invalid assembly (e.g. ldrd r0, [#0, r2]) has been fixed.

VFPv3/NEON debug information.  A bug in the compiler which caused it to generate incorrect debug information for code using VFPv3/NEON registers has been fixed. The debugger is now able unable to locate and display values held in these registers.

iWMMXt compiler errors.  A compiler bug that caused invalid assembly when generating iWMMXt code has been fixed.

ARMv6-M system instructions.  An assembler bug that caused some ARMv6-M system instructions to be incorrectly rejected has been fixed. The affected instructions are msr, mrs, yield, wfi, wfe and sev.

Assembling Thumb store-multiple instructions.  The assembler now issues an error message instead of crashing on load/store multiple instructions that incorrectly use Thumb-2 addressing modes (e.g., ldmdb) in legacy Thumb syntax mode. If you want to use these address modes, you should use unified syntax mode instead.

Thumb-2 stack decrement misassembly.  An assembler bug that resulted in incorrect encoding of the 32-bit Thumb-2 form of the sub sp, sp, #const instruction has been fixed. Previously this was misassembled as subs.

Naked functions.  Functions marked with __attribute__((naked)) no longer contain prologue and epilogue code. Please refer to the GCC manual for the proper use of this attribute.

Assembly of Thumb-2 load/store multiple instructions.  The Thumb-2 ldm and stm assembly mnemonics are now assembled to ldr and str instructions when a single register is transferred, as specified in the Thumb-2 Architecture Supplement.

Conditional Thumb-2 branch instructions.  A linker bug that could cause objects involving conditional Thumb-2 branch instructions to be incorrectly rejected has been fixed.

Fix addr2line defect.  The binary utility addr2line now operates correctly on 64-bit targets with DWARF2 debug information.

Thumb-2 assembler infinite loop.  An assembler bug that would cause it to enter an infinite loop when processing some Thumb-2 assembly has been fixed.

Assembler warnings about overlapping multiplication operands.  The assembler no longer warns about overlapping Rd and Rm operands when assembling mul and mla instructions for the ARM architecture version six or above.

Alignment bug fix.  A bug has been fixed that formerly caused incorrect code to be generated in some situations for copying structure arguments being passed by value. The incorrect code caused alignment errors on stack accesses on some targets.

ARM Cortex-A8 performance improvements.  Sourcery G++ Lite now generates faster code when compiling for the ARM Cortex-A8 processor by scheduling instructions for the processor's dual-issue pipelines. To generate code for this processor, use the -mcpu=cortex-a8 command-line option.

GCC version 4.2.  Sourcery G++ Lite for ARM SymbianOS is now based on GCC version 4.2. For more information about changes from GCC version 4.1 that was included in previous releases, see http://gcc.gnu.org/gcc-4.2/changes.html.

Improve handling of corrupt debug information.  The binary utility readelf now copes more gracefully with corrupted DWARF 2 information.

Smaller C++ programs.  Rarely-used functions in the C++ runtime library have been isolated into separate object files so that they will not be included unless needed. As a result, most statically linked C++ programs are smaller.

Changes in Sourcery G++ Lite 4.1-37

Preserve volatile accesses.  Reads from volatile memory are no longer incorrectly optimized away at higher optimization levels.

Changes in Sourcery G++ Lite 4.1-34

Implicit conversions between generic vector types.  Implicit conversions between generic vector types are now only permitted when the two vectors in question have the same number of elements and compatible element types. (Note that the restriction involves compatible element types, not implicitly-convertible element types: thus, a vector type with element type int may not be implicitly converted to a vector type with element type unsigned int.) This restriction, which is in line with specifications for SIMD architectures such as AltiVec, may be relaxed using the flag -flax-vector-conversions. This flag is intended only as a compatibility measure and should not be used for new code.

type_info comparison fix.  Comparison of type_info objects now uses pointer comparison where possible.

C++ forced unwinding fixes.  Some bugs relating to forced unwinding through C++ code have been fixed.

Support for additional Stellaris boards.  Linker scripts are provided for the 6xx and 8xx series Stellaris boards.

Linux support for USB Debug Sprite.  A new driver is included to allow the Sourcery G++ Lite USB Debug Sprite to run on Linux hosts. See Chapter 3, Sourcery G++ Lite for ARM SymbianOS for additional information.

Changes in Sourcery G++ Lite 4.1-33

Linker scripts.  A bug is fixed where an erroneous linker script would cause a linker crash. An error message is now produced.

Newlib memory use improvements.  The memory overhead of linking with newlib is reduced. Applications that use only a minimal set of library features may now require significantly less memory.

Changes in Sourcery G++ Lite 4.1-31

Compiler alias analysis.  The type-based alias analysis performed by the compiler when compiling with -O2 or with -fstrict-aliasing is now more conservative. The more aggressive analysis used in previous versions sometimes resulted in incorrect code generation.

Fully relocatable preprocessor.  When cross-compiling, the default preprocessor search path includes only the directories present in the installed toolchain. This speeds up the preprocessor and prevents the unintentional use of unrelated files and directories on the machine where it is installed.

Changes in Sourcery G++ Lite 4.1-29

Support for new-style symbol hashing.  Support has been added in binutils and the prelinker for new-style (also known as DT_GNU_HASH) symbol hashing. This can dramatically speed up symbol resolution time and is particularly applicable in environments where full prelinking is not possible (for example where shared libraries are dynamically opened at runtime). The new-style hashing may be enabled by passing --hash-style=gnu to the linker.

Prelinker update.  The prelinker has been updated to the current upstream sources and some bugs affecting operation have been fixed.

Changes in Sourcery G++ Lite 4.1-28

Improved support for ROM debugging.  GDB now determines ROM regions automatically from the memory map included in target configuration files. This information is used to determine when hardware breakpoints should automatically be used (for instance the step, next and finish commands). Separate ROM configurations have been removed from the Eclipse debugger menu. The Eclipse GUI has been extended to provide improved support for debugging programs in ROM, when a memory map is not automatically available.

Changes in Sourcery G++ Lite 4.1-27

Rename Windows executables.  The Windows host tools make.exe and rm.exe are now named cs-make.exe and cs-rm.exe. This change avoids conflicts with tools provided by other distributors.

iWMMXt bug fixes.  Some bugs involving incorrect code generation and internal compiler errors when generating iWMMXt code have been fixed.

Cortex-M3 startup code.  The ARMv7M startup code (armv7m-crt0.o) incorrectly contained ARM code. This has been replaced with Thumb-2 code.

ARM EABI coverage testing support.  Coverage testing using GCOV is now supported for the ARM EABI target. Please refer to the GNU C Compiler Manual (HTML) for more information on coverage testing.

Changes in Sourcery G++ Lite 4.1-23

Windows debugging fix.  In recent releases of Sourcery G++ Lite, the GDB target remote | command would hang on Windows. This affected both command line and Eclipse debugging when using the Sourcery G++ Lite Debug Sprite.

Stellaris USB Debug Sprite improvements.  The former USB Debug Stub, armswd, is now known as the USB Debug Sprite, and has been renamed to arm-stellaris-eabi-sprite. In addition, its initialization sequence has been updated to recognize the r1p1 release of the Cortex-M3 processor.

Incompatible changes to Stellaris linker scripts.  Sourcery G++ Lite now supports linking executables to run from RAM as well as ROM. As part of this change, there are now separate RAM and ROM versions of the linker scripts for each supported board, and the former ROM-based versions have been renamed. For example, if you were formerly linking with -T lm3s10x.ld, you should now use -T lm3s10x-rom.ld to get the same behavior.

Changes in Sourcery G++ Lite 4.1-21

Eclipse debuggers.  Eclipse configurations for debugging arm-none-eabi applications using the GDB simulator and remote debug stubs have been added.

iWMMXt2 support.  The assembler and disassembler now support iWMMXt2 instructions.

NEON intrinsics support.  GCC now supports NEON intrinsics defined in the arm_neon.h header. These are the same intrinsics supported by the ARM RVCT compiler and are documented in the 'ARM NEON Intrinsics' section of the GCC manual.

Changes in Sourcery G++ Lite 4.1-19

ARMv4t linux multilib.  Linux configurations now support ARMv4t CPUs.

Linker scripts.  Several problems with the linker scripts for bare-metal targets have been fixed.

Changes in Sourcery G++ Lite 4.1-18

Binutils update.  The binutils in this release is based on the final binutils 2.17 release.

GDB update.  The included version of GDB has been upgraded to 6.5.50.20060822. This includes numerous bug fixes from the previous version.

GDB support for flash memory.  The GDB load command can now write to flash memory, if the remote debugging stub contains appropriate support.

Compiler support for NEON.  Initial GCC support for autovectorization and generation of NEON SIMD instructions has been added.

Bare metal Cortex-M3 configurations.  Bare metal configurations now support generating images for use on ARMv7M devices (eg. Cortex-M3).

iWMMXt support in GLIBC.  GLIBC's setjmp and longjmp now support saving and restoring iWMMXt registers on hardware with those registers. This requires a kernel reporting iwmmxt in the Features entry in /proc/cpuinfo.

iWMMXt exception handling support.  Exception handling now restores the values of iWMMXt registers correctly.

Corrected IPC functions.  A bug in GLIBC's msgctl, semctl, and shmctl functions has been corrected.

Changes in Sourcery G++ Lite 4.1-16

GCC update.  This release is based on GCC 4.1.1.

Fully relocatable compiler.  The compiler now searches for its components only in the directory where it has been installed, and no longer also searches pathnames matching the directory where it was configured. This speeds up the compiler and prevents problems with unintentionally finding unrelated files or directories on the machine where it has been installed.

Stack permission marking for ARM GNU/Linux.  Non-executable stacks can provide increased security against some forms of buffer overflow attacks. The tools involved must coordinate the annotation of required stack permissions, either executable, or non-executable. For ARM GNU/Linux targets the compiler now outputs annotations indicating the required stack permissions.

Changes in Sourcery G++ Lite 4.1-15

Stabs debugging information support.  Using the Stabs debugging format (available with -gstabs or -gstabs+) now works in conjunction with -mthumb. CodeSourcery recommends the default DWARF debugging format (available with -g) as DWARF is a more comprehensive debugging format.

Changes in Sourcery G++ Lite 4.1-13

Stellaris linker scripts in IDE.  Linker scripts may now be selected via a drop-down menu in Eclipse.

Stellaris linker scripts for 3xx series CPUs.  The linker scripts for 3xx Series CPUs now place the ISR vector at address zero, as required by all Cortex-M3 cores.

Stellaris USB Debug Sprite improvements.  Bug fixes and new features include:

  • A bug that caused the stub not to correctly update the program counter and other register values was fixed. As a result of this fix, it is now possible to run programs residing in SRAM using the continue command from GDB.
  • The stub no longer prints status messages via GDB console output when invoked with the -q command-line option.
  • The stub's initialization sequence was updated to recognize revision C Cortex-M3 hardware.

Changes in Sourcery G++ Lite 4.1-9

Stellaris USB Debug Sprite improvements.  Program images exceeding 4K can now be uploaded to flash memory.

Additional Stellaris boards supported.  The Stellaris 301, 310, 315, and 316 CPUs are now supported. Linker scripts have been added for these boards.

Changes in Sourcery G++ Lite 4.1-8

Stellaris USB Debug Sprite improvements.  Several bug fixes and enhancements were made to the USB Debug Stub. In particular:

  • Bugs in the implementation of open, read, and lseek were fixed.
  • Support was added for isatty, rename, unlink, and system.
  • Memory reads that span 4K block boundaries now work correctly.

Changes in Sourcery G++ Lite 4.1-4

Runtime libraries.  Support for ARMv7 including Cortex-M3 and pure Thumb-2.

Assembler.  Support for NEON and VFPv3, including unified NEON/VFP syntax.

Changes in Sourcery G++ Lite 4.1-1

Initial release.  This release is based on GCC 4.1.0.