Appendix A. Sourcery G++ Lite Release Notes

This appendix contains information about changes in this release of Sourcery G++ Lite for Power EABI. You should read through these notes to learn about new features and bug fixes.

Table of Contents

A.1. Changes in Sourcery G++ Lite for Power EABI

A.1. Changes in Sourcery G++ Lite for Power EABI

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

A.1.1. Changes in Sourcery G++ Lite 2010.09-56

Code generation improvements.  The compiler now generates better code for masks combined with a comparison against zero in certain cases. Additionally, it now uses conditional moves rather than branches in more situations.

New -fstrict-volatile-bitfields The compiler has a new option, -fstrict-volatile-bitfields, which forces access to a volatile structure member using the width that conforms to its type. Refer to the GCC manual for details.

New __builtin_isel functions.  GCC now supports a family of __builtin_isel builtin functions, which expand inline into isel instructions. These new builtins are only supported on processors that support the isel instruction. For more information, please see the GCC manual.

Floating-point code generation fix for e500.  An optimizer bug that sometimes caused GCC to generate incorrect code for floating-point arithmetic on e500 processors has been fixed.

Linker debug information fix.  A bug in linker processing of debug information has been fixed. The bug sometimes prevented the Sourcery G++ debugger from displaying source code if the executable was linked with the --gc-sections option.

Optimized square root functions.  The performance of the functions sqrt and sqrtf has been improved for the following runtime libraries:

  • 603 - 32-bit
  • e600 (Altivec) - 32-bit
.

GDB crash fix for e5500 binaries.  A bug has been fixed that caused GDB to crash or to print Architecture of file not recognized when processing some e5500 binaries. The bug also affected debugging binaries for other non-e500 processors.

GDB support for e5500.  GDB now recognizes powerpc:e5500 as a valid argument to the set architecture command.

A.1.2. Changes in Sourcery G++ Lite 2010.09-10

Changes to Sourcery G++ version numbering.  Sourcery G++ product and Lite toolchains now uniformly use a version numbering scheme of the form 2010.09-56. The major and minor parts of the version number, in this case 2010.09, identify the release branch, while the final component is a build number within the branch. There are also new preprocessor macros defined by the compiler for the version number components so that you may conditionalize code for Sourcery G++ or particular Sourcery G++ versions. Details are available in the Sourcery G++ Knowledge Base.

Support for AppliedMicro Titan (APM83xxx) cores.  Sourcery G++ has been enhanced to emit code optimized for AppliedMicro Titan (APM83xxx) cores, selectable with GCC's -mcpu=titan command-line option.

GCC fix for reference to undefined label.  A bug in the optimizer that caused GCC to emit references to undefined labels has been fixed.

Alignment attributes.  A bug has been fixed that caused the compiler to ignore alignment attributes of C++ static member variables where the attribute was present on the definition, but not the declaration.

Compiler optimization improvements.  The compiler has been enhanced with a number of optimization improvements, including:

  • More efficient assignment for structures containing bitfields.
  • Better code for initializing C++ arrays with explicit element initializers.
  • Improved logic for eliminating/combining redundant comparisons in code with nested conditionals.
  • Better selection of loop variables, resulting in fewer temporaries and more efficient register usage.
  • Better code when constant addresses are used as arguments to inline assembly statements.
  • Better code for copying small constant strings.

GCC version 4.5.1.  Sourcery G++ Lite for Power EABI is now based on GCC version 4.5.1. For more information about changes from GCC version 4.4 that was included in previous releases, see http://gcc.gnu.org/gcc-4.5/changes.html.

Archiver bug fix.  A bug has been fixed in the ar utility, which sometimes caused it to produce unrecognizable 64-bit files. The bug also caused similar problems in the strip and objcopy utilities when processing 64-bit archives.

Smaller C++ programs with -g An assembler bug has been fixed that caused unnecessary references to exception-handling routines from C++ programs when debug information is enabled. For programs that do not otherwise use exceptions, this change results in smaller code size.

Additional validation in the assembler.  The assembler now diagnoses an error, instead of producing an invalid object file, when directives such as .hidden are missing operands. The assembler now also issues errors about uses of lswi, lswx, stswi, and stswx on architectures where they are not supported.

powerpc-eabi-objcopy bug fix.  A bug has been fixed that caused powerpc-eabi-objcopy to enter an infinite loop when processing object files in non-ELF formats. The bug also affected powerpc-eabi-objdump.

Strip bug fix.  A bug in the strip and objcopy utilities, which resulted in stripped object files that the linker could not recognize, has been fixed.

Binutils update.  The binutils package has been updated to version 2.20.51.20100809 from the FSF trunk. This update includes numerous bug fixes.

Additional alignment in CS3-defined linker scripts.  Sourcery G++ now ensures 8-byte alignment at additional points in CS3-defined linker scripts. Previously, placing a symbol in certain sections broke the initialization of the .data and/or .bss sections.

Newlib update.  The Newlib package has been updated to version 1.18.0, with additions from the community CVS trunk as of 2010-08-12. This update provides additional wide-character functions, along with other bug fixes and enhancements.

malloc fix.  A bug that sometimes caused free to dereference an invalid address has been fixed. The bug was caused by incorrect handling within malloc of calls to sbrk from outside of malloc.

GDB update.  The included version of GDB has been updated to 7.2.50.20100908. This update adds numerous bug fixes and new features, including improved C++ language support, a new command to save breakpoints to a file, a new convenience variable $_thread that holds the number of the current thread, among many other improvements.

GDB crash fix.  A bug has been fixed that caused GDB to crash on launch if the environment variable CYGPATH is set to a program that does not exist or cannot be executed.

A.1.3. Changes in Sourcery G++ Lite 4.4-196

Optimized E500 software floating-point functions.  Sourcery G++ Lite now provides double-precision floating-point arithmetic libraries that are optimized for Freescale CPUs containing E500 cores, such as the 8540 and the 8548. To use the optimized libraries in your application, link with -te500v1 or -te500v2.

Improved code generation for if statements.  The compiler can now generate better code for if statements when the then and else clauses contain similar code.

IBM PowerPC 476 support.  Sourcery G++ now includes support for IBM PowerPC 476 processors. To compile for these processors, use -mcpu=476fp for processors with hardware floating-point support and -mcpu=476 for processors without hardware floating-point support.

GDB shared library support.  GDB now supports targets that report loaded shared libraries using the qXfer:libraries:read Remote Serial Protocol packet. For more information, see the GDB manual.

Linker bug fix for --section-start A linker bug that caused --section-start to fail to work as documented if the section is defined in multiple object files has been fixed.

Optimized math functions for E500 cores.  Optimized implementations of log10, atan, scalbn, modf, log, ceil, abs, floor, and atan2 have been added for Freescale CPUs containing E500 cores, such as the 8540 and the 8548.

Linker script processing improvement.  The linker can now automatically place sections that are not mentioned in your linker script. Previously, it issued the error no memory region specified for loadable section.

GCC internal compiler error.  A bug has been fixed that caused GCC to crash when compiling some C++ code using templates at -O2 or -O3.

Linker script compatibility.  A bug that caused the linker error undefined reference to `__cs3_start_asm' has been fixed. The bug applied to projects using a linker script from an older version of Sourcery G++ with a newer CS3 library.

GCC internal compiler error with optimize attribute.  A bug has been fixed that caused the compiler to crash when invoked with the -O0 or -O1 option on code using the optimize attribute to specify higher optimization levels for individual functions.

Internal compiler error fix.  A bug has been fixed that caused the compiler to crash after issuing a warning function called through a non-compatible type. Such code has undefined behavior at runtime, but the compiler no longer crashes while processing it.

A.1.4. Changes in Sourcery G++ Lite 4.4-144

Debugging preprocessed source code.  A compiler bug has been fixed that caused debug output to erroneously contain the name of the intermediate preprocessed file.

GDB update.  The included version of GDB has been updated to 7.0.50.20100218. This update adds numerous bug fixes and new features, including improved C++ language support, automatic caching of stack memory, and Position Independent Executable (PIE) support.

Static constructor and destructor ordering fixes.  The linker now correctly ensures that static destructors with priorities are executed after destructors without priorities. Another linker bug that caused incorrect static constructor and destructor ordering with partial linking involved has been fixed.

-mblock-move-inline-limit option added.  The compiler now supports the -mblock-move-inline-limit option. This option enables you to specify the maximum size of block moves (such as calls to memcpy or structure copies) that should be inlined.

Code size with -g A bug that caused binary code size regressions in GCC 4.4 when compiling with -g has been fixed.

Optimizer bug fix.  A bug in GCC that caused internal compiler errors at -O2 or above has been fixed. The bug also occurred at other optimization levels when the -fpromote-loop-indices command-line option was used.

Improved use of isel instruction.  When compiling for Freescale's E500 and QorIQ processors, the compiler now uses the isel instruction in sequences where the mfcr instruction was previously used. This change permits the compiler to better schedule instructions for improved performance.

Optimized library functions for E500 cores.  Optimized implementations of memcpy, memmove, memset, bzero, strlen, strcmp, and strcpy have been added for Freescale CPUs containing E500 cores, such as the 8540 and the 8548.

GDB asynchronous mode fix.  GDB can now be used from the command line in asynchronous mode with remote targets. Previously, GDB did not accept user input while asynchronous commands (such as continue &) were running.

Frame manipulation bug fix.  A bug in GDB has been fixed that caused frame manipulation commands to report an internal error in some cases when used on arbitrary stack frames specified by an address.

Read watchpoints bug fix.  A GDB bug has been fixed that caused watchpoints set to trigger on memory reads to be silently ignored in some cases.

Improved disassembly of SPE instructions.  GDB now supports disassembling SPE instructions when using the disassemble command.

Setting thread-specific breakpoints in GDB.  A bug in GDB has been fixed that caused a syntax error for the break *expression thread threadnum command.

CS3 program startup behavior revised.  CS3's model for program startup has been made more uniform across different target profiles. Changes include:

  • Execution now consistently begins at hard reset (__cs3_reset) for all profiles. Formerly, the debugger began execution at assembly initialization (_start) instead.
  • All profiles now perform the assembly initialization phase, using profile-specific code. Formerly, simulator and boot monitor profiles skipped this initialization phase.

Most existing programs using customized linker scripts or startup code based on the previous CS3 initialization model should continue to work as before with the new CS3 library. For more details on the CS3 startup model, refer to Section 5.2, “Program Startup and Termination”.

CS3 improvements.  Several changes have been made to CS3 to make it easier to customize, including improved documentation and additions and corrections to the header file cs3.h. For details, see Chapter 5, “CS3™: The CodeSourcery Common Startup Code Sequence”.

Improved assembler error checking.  The assembler has been improved to perform additional checks for invalid inputs.

A.1.5. Changes in Sourcery G++ Lite 4.4-79

Incorrect symbol addresses bug fix.  A bug in the linker that caused it to assign incorrect addresses to symbols has been fixed. The bug occurred when the input objects contained sections not explicitly mentioned in the linker script.

@FILE fix.  A bug has been fixed in the processing of @FILE command-line options by GCC, GDB, and other tools. The bug caused any options in FILE following a blank line to be ignored.

GDB interrupt handling bug fix.  A bug in GDB has been fixed that caused it to sometimes fail to indicate that the target had stopped after being interrupted. The bug affected clients using GDB's MI front end.

Preprocessor error handling.  The preprocessor now treats failing to find a file referenced via #include as a fatal error.

ELF file corruption with strip A bug that caused strip to corrupt unusual ELF files has been fixed.

GDB support for Cygwin pathnames.  A bug in GDB's translation of Cygwin pathnames has been fixed.

GDB and programs linked with the --gc-sections linker option.  GDB has been improved to better handle debug information found in programs and libraries linked with the --gc-sections option. GDB formerly selected the wrong debug information in some cases, resulting in incorrect behavior when stepping over a function or displaying local variables, for example.

GDB memory find bug fix.  A bug in GDB's find command has been fixed. The bug caused searches on large memory areas to fail or report matches at incorrect addresses.

Debugger errors after loading program.  A bug in GDB has been fixed that sometimes caused a GDB internal error after the load command.

Static variables and asm statements bug fix.  A bug in GCC that caused functions containing static variables and asm statements to be miscompiled at -O2 or above has been fixed. The bug also occurred at other optimization levels when the -fremove-local-statics command-line option was used.

Linker script fixes.  A bug in CS3 linker scripts for U-Boot and simulator profiles has been fixed. The bug resulted in data memory being too small, which sometimes caused the stack to be overwritten during initialization, or reduced space for malloc to allocate.

Optimizer bug fix.  A bug in GCC that caused functions with complex loop nests to be miscompiled at -O2 or above has been fixed. The bug also occurred at other optimization levels when the -fpromote-loop-indices command-line option was used.

GCC internal compiler error.  A bug has been fixed that caused the compiler to crash when optimizing code that casts between structure types and the type of the first field.

ELF Program Headers.  The linker now better diagnoses errors in the usage of FILEHDR and PHDRS keywords in PHDRS command of linker scripts. Refer to the linker manual for more information.

A.1.6. Changes in Sourcery G++ Lite 4.4-17

Optimizer improvements.  When optimizing for speed, the compiler now uses improved heuristics to limit certain types of optimizations that may adversely affect both code size and speed. This change also makes it possible to produce better code when optimizing for space rather than speed.

GDB finish internal error.  A bug has been fixed that caused a GDB internal error when using the finish command. The bug occurred when debugging optimized code.

GDB update.  The included version of GDB has been updated to 6.8.50.20090630. This update adds numerous bug fixes and new features, including support for multi-byte and wide character sets and improved C++ template support.

GDB and third-party compilers.  Some bugs that caused GDB to crash when debugging programs compiled with third-party tools have been fixed. These bugs did not affect programs built with Sourcery G++.

Remote debugging hardware watchpoint bug fix.  A GDB bug has been fixed that caused hardware watchpoint hits to be incorrectly reported in some cases.

GDB internal warning fix.  A GDB bug has been fixed that caused warnings of the form warning: (Internal error: pc address in read in psymtab, but not in symtab.).

Incorrect linker diagnostic removed.  The linker has been corrected to not emit an error message when the load address of an output section with no contents overlaps an output section with contents. This can occur in linker scripts that use MEMORY regions and AT> to place initialized contents into ROM.

Linker script load address processing.  A bug in the linker has been fixed affecting linker scripts using AT>region to set the load address. This now follows the documented behavior of maintaining the virtual address to load address difference in output section statements. Refer to the "Output Section LMA" section of the linker manual for details of how to control the load address.

Debug section placement.  A linker script bug in CS3 has been fixed that caused .debug_ranges debug sections to be misplaced.

Binutils update.  The binutils package has been updated to version 2.19.51.20090709 from the FSF trunk. This update includes numerous bug fixes.

Interrupting the target from the debugger.  GDB has been improved to be more responsive to attempts to interrupt the target (as by a Ctrl+C when using GDB from the command line) during execution of programs using semihosting.

Bug fix in simulator exit code.  A bug in the semihosting implementation of exit that could cause simulated programs to crash with a segmentation fault has been fixed.

isel instruction support.  The GDB simulator now supports the isel instruction, present on E500 and QorIQ™ processors.

Newlib update.  The Newlib package has been updated to version 1.17.0, with additions from the community CVS trunk as of 2009-02-24. This update provides new C99 wide-character functions; POSIX regex functions; string-function performance improvements; an improved sprintf implementation that no longer requires I/O functions like _open, _write, and _close; and other bug fixes and improvements. For more information, refer to the Newlib C Library and Math Library manuals, and to the Newlib web site at http://sourceware.org/newlib/.

Installer fails during upgrade.  The Sourcery G++ installer for Microsoft Windows hosts could fail during an upgrade while waiting for the previous version to be uninstalled. This bug has been fixed.

Uninstaller removed by upgrade.  The uninstaller could be incorrectly deleted during an upgrade on Microsoft Windows hosts. This bug has been fixed.

Remote debugging connection auto-retry.  The target remote command within GDB now uses a configurable auto-retry timeout when establishing TCP connections. This is useful in avoiding race conditions when the remote GDB stub or GDB server is launched simultaneously with GDB. The auto-retry behavior is enabled by default; refer to the GDB manual for details.

Extraneous linker error messages.  A linker bug that caused extraneous error messages of the form Dwarf Error: Offset (507) greater than or equal to .debug_str size (421). has been corrected. This bug did not affect the correctness of output binaries.

GDB segment warning.  Some compilers produce binaries including uninitialized data regions, such as the stack and heap. GDB incorrectly displayed the warning Loadable segment "name" outside of ELF segments for such binaries; the warning has now been fixed.

Register variable corruption.  A compiler bug has been fixed that caused incorrect code to be generated when the frame pointer or other special-use registers are used as explicit local register variables, introduced via the asm keyword on their declarations.

Startup code debugging fixes.  Two GDB bugs have been fixed that caused errors when debugging startup code. One bug caused an internal error message; the other caused the error Cannot find bounds of current function.

powerpc-eabi-objcopy bug fix.  A bug has been fixed that caused powerpc-eabi-objcopy to issue an error when generating output in the Intel HEX format and using --change-section-lma to change section addresses.

Linker script search path.  The bug in the linker has been fixed that caused it not to follow its documented behavior for searching for linker scripts named with the -T option. Now scripts are looked up first in the current directory, then in library directories specified with -L command-line options, and finally in the default system linker script directory.

tlbilx encoding fix.  An assembler bug that resulted in an incorrect encoding of the tlbilx instruction and its extended mnemonics tlbilxlpid, tlbilxpid, and tlbilxva has been fixed.

-fremove-local-statics optimization.  The -fremove-local-statics optimization is now enabled by default at -O2 and higher optimization levels.

Install directory pathnames.  Bugs in the install and uninstall scripts for Linux hosts that caused errors or incorrect behavior when the Sourcery G++ install directory pathname contains whitespace characters have been fixed.

Elimination of spurious warnings about NULL The C++ compiler no longer issues spurious warnings about comparisons between pointers to members and NULL.

Vectorizer improvements.  The compiler now generates improved code for accesses to static nested array variables (e.g. static int foo[8][8];).

Binutils update.  The binutils package has been updated to version 2.19.51.20090205 from the FSF trunk. This update includes numerous bug fixes.

GDB quit error.  A bug in GDB has been fixed that caused quit to report Quitting: You can't do that without a process to debug. when debugging a core dump file.

GCC version 4.4.1.  Sourcery G++ Lite for Power EABI is now based on GCC version 4.4.1. For more information about changes from GCC version 4.3 that was included in previous releases, see http://gcc.gnu.org/gcc-4.4/changes.html.

Linker map address sorting.  The map generated by the linker -Map option now lists symbols sorted by address.

GDB update.  The included version of GDB has been updated to 6.8.50.20081022. This update includes numerous bug fixes.

A.1.7. Changes in Older Releases

For information about changes in older releases of Sourcery G++ Lite for Power EABI, please refer to the Getting Started guide packaged with those releases.