This section documents Sourcery G++ Lite changes for each released revision.
E500 large stack frame fix. A bug that caused GCC to generate incorrect code for functions with large stack frames on E500 targets has been fixed.
GDB info registers crash fix. Executing info registers after executing flushregs no longer crashes GDB.
GDB and Ctrl-C on Windows . GDB no longer crashes when you press Ctrl-C twice during remote debugging to give up waiting for the target.
E500 small data fix. A bug that caused an internal compiler error when attempting to place float or vector variables into the small data section has been fixed.
Improved argument-passing code. The compiler can now generate more efficient code for certain functions whose arguments must be sign-extended to conform with language or ABI conventions. The required conversion was formerly being performed both in the called function and at all call sites; now the redundant conversion has been eliminated for functions that can only be called within the compilation unit where they are defined.
Multi-process mode for gdbserver.
The gdbserver utility has a new command-line option,
--multi
, that allows you to use it to debug multiple
program instances. Refer to the Debugger manual for more information.
GDB qOffsets
crash fix.
GDB no longer crashes when a remote stub provides load
offsets for an unlinked object file.
Function prologue and epilogue size improvements.
Calls to library routines are now used in function prologues
and epilogues when compiling with -Os
, which
results in smaller functions. In addition, the necessary routines
are only included when used, which leads to smaller binaries.
GCC stack size limit increased. On Windows hosts, the maximum stack size for the GCC executable has been increased. This means that more complex programs can be compiled.
Stack overflows in printf
.
Some stack overflows in printf
-family
functions have been fixed. These overflows occurred with
format strings with very large precision values such as
%1.300000000s
, and with some invalid format
strings.
Invalid object file after strip.
A bug in the assembler has been fixed that formerly caused
.set
constructs to emit symbol
expression
symbol
in the
wrong section. This in turn caused inconsistent behavior
after stripping the symbol table.
GCC update. The GCC package has been updated to version 4.2.3. This version includes numerous bug fixes since GCC 4.2.
License checking on Linux.
Sourcery G++'s license-checking logic now includes a workaround
for a kernel bug present in some versions of Linux. This bug
formerly caused failures with an error message from the
cs-license
component.
C++ library ABI fix.
GCC 4.2.1's std::type_info
was not fully
compatible with earlier versions. The ordering of four
virtual functions has been fixed in this update.
Improved gdbserver thread support.
The GNU/Linux remote debug agent,
gdbserver, no longer fails when two
threads call pthread_create
at the same
time. It also supports limited thread debugging when
symbols for libpthread.so
are not
available.
GDB support for user-defined prefixed commands. The GDB define and document commands, which allow you to add new commands to the GDB command-line interface, now support creating commands within an existing prefix such as target. Hooks for prefixed commands are also supported. Refer to the Debugger manual for more information.
GDB update. The included version of GDB has been updated to 6.7.20080107. This update includes numerous bug fixes.
UNC pathname bug fix.
A bug has been fixed that caused linker errors on Windows
hosts when running a Sourcery G++ toolchain installed in a UNC
path
(\\
).
host
\directory
Linker crash on invalid input files.
Some older versions of GCC generated object files with
invalid mergeable string sections when compiling with
-fmerge-all-constants
. This bug was fixed
in Sourcery G++ as of version 4.1-43. However, since system
libraries included with some GNU/Linux distributions were
affected by this bug, the linker has now been changed to
accept object files with such invalid sections, rather than
crash or produce an error message.
GDB search path bug fix.
A bug in GDB has been fixed that formerly resulted in an internal
error when setting solib-search-path
or
solib-absolute-prefix
after establishing a
connection to a remote target.
Binutils update. The binutils package has been updated to version 2.18.50.20080215 from the FSF trunk. This update includes numerous bug fixes.
String alignment changes when optimizing for size.
When compiling with -Os
, strings are aligned
to byte boundaries instead of word boundaries on non-E500
targets. This change results in smaller binaries.
Race fixes in setuid
.
Several bugs in multi-threaded setuid
have been fixed. The bugs led to threads with incorrect
privileges and hangs at thread exit. The
setgid
, seteuid
,
setegid
, setreuid
,
setregid
,
setresuid
, and
setresgid
functions were also affected.
gdbserver support for execution wrappers.
gdbserver has a new command-line option,
--wrapper
, which specifies a wrapper for any
programs run by gdbserver. The specified wrapper can
prepare the system and environment for the new program.
Read-only variables.
The C++ compiler now places variables whose types are
instantiations of template classes in a read-only data
section if they are declared const
and
initialized with a constant value. This changes reduces the
RAM usage of affected applications.
No significant changes. There are no significant changes for Power GNU/Linux in this release.
E500 compiler crash. A bug that caused the compiler to crash on some versions of Fedora Core when compiling for E500 targets has been fixed.
Linker error allocating ELF segments. A bug where the linker produces an incorrect error message with segments at the top of the address space has been fixed.
Volatile postincrement and postdecrement bug fix. A code generation bug that caused postincrement or postdecrement of a volatile object to reread the modified value from that object in some contexts has been fixed. The bug affected code performing a comparison of the postincrement or postdecrement expression with a constant, or that was optimized to comparison with a constant.
C++ class debug information.
The flag -femit-class-debug-always
is now disabled by default. The flag produces
duplicate C++ class debug information as a
work-around for older debuggers.
Optimized memcpy
and
memmove
.
Optimized implementations of memcpy
and memmove
have been added for E500
targets.
Improved breakpoints in constructors and template functions. GDB now supports breakpoints on source code locations that have several code addresses associated with them. Setting a breakpoint on a constructor automatically associates the breakpoint with all constructor bodies generated by GCC. If you set a breakpoint on a line of a templated function, GDB breaks at the indicated line in all instantiations of the templated function.
GDB printf %p.
GDB's printf command now supports the
"%p"
format specifier.
GDB update. The included version of GDB has been updated to 6.6.20070821. This update includes numerous bug fixes.
Assembler code file name suffixes.
GCC now recognizes .sx
as well as
.S
as a file name suffix indicating
assembler code which must be preprocessed.
The alternate suffix may be useful in conjunction with other
program development tools on Windows that do not distinguish
case on filenames and treat .S
the same
as .s
, which GCC uses to indicate assembler
code without preprocessing.
E500 vectorization support.
When compiling for E500 targets,
the -ftree-vectorize
flag now enables
automatic vectorization of loops.
Large stack frame fix. A bug that caused GCC to generate incorrect code for functions with large stack frames on E500 targets has been fixed.
E500 interrupt safety fix. A bug that caused GCC to generate function epilogues that were not interrupt safe on E500 targets has been fixed.
Improved inline memset
,
memcpy
, and memmove
for E500.
GCC can now use E500 vector instructions when generating
inline code for memset
, memcpy
,
or memmove
on E500 targets.
Preprocessing assembly code.
The compiler driver passes -I
options to the
assembler, so that #include
directives
(processed by the preprocessor) and .include
directives (processed by the assembler) use the same search
path.
Dynamically-initialized const
variables.
Dynamically-initialized namespace-scope C++ variables are no
longer placed in read-only data sections, even when marked
const
. These variables must be modified at
startup, so they cannot be placed in ROM, even though their
values cannot change once initialized.
Register allocation bug fix. A register allocation bug has been fixed. Under rare circumstances, the bug caused incorrect code generation.
Disabling diagnostics for use of system header and
library directories.
The warnings for use of options such as
-I/usr/include
when cross compiling can be
disabled with a new option
-Wno-poison-system-directories
. This
option is intended for use in chroot environments when such
directories contain the correct headers and libraries for
the target system rather than the host.
Debugging of statically-linked threaded programs.
GDB and EGLIBC now support thread debugging when using GCC's
-static
option. Existing statically-linked
programs must be relinked after upgrading EGLIBC for this
fix.
Crash when generating vector code.
A bug that sometimes caused the compiler to crash when invoked with
the -ftree-vectorize
option has been fixed.
Stricter check for anonymous unions. G++ now issues an error about invalid code that uses the same name for a member of an anonymous union and an entity in the surrounding namespace. For example, you will now get an error about code like:
int i; static union { int i; };
because both the global variable and the anonymous union
member are named i
. To make this code
valid you must change one of the declarations to use a
different name.
GCC update. The GCC package has been updated to version 4.2.1. This version includes numerous bug fixes since GCC 4.2.
Smaller code for C++ destructors.
G++ now generates more compact code to handle the
destruction of C++ objects declared at namespace scope or
declared within a function scope using the
static
keyword.
Robustness on Microsoft Windows. Defects that sometimes caused GDB to become non-responsive on Microsoft Windows have been eliminated.
Binutils update.
The binutils package has been updated to the 2007-08-19
version of the pre-2.18 FSF trunk. This contains many
new improvements and bug fixes. For more information,
refer to the manuals for the individual utilities, and
to the binutils web site at
http://www.gnu.org/software/binutils/
.
Debugging information fix. GCC no longer generates invalid debugging information for sections with no contents. The invalid debugging information caused the GNU/Linux prelinker to crash.
ABI markings for Power Architecture binaries.
GCC and Binutils now mark Power Architecture binaries
according to their floating point and vector calling
conventions. The linker reads this information and
warns when mismatched object files are linked together.
For example, the linker warns if -msoft-float
objects are linked to a -mhard-float
C library.
GDB uses the same information to correctly call
functions from the command line and display return values
after finish.
Inlined function debugging fix. GDB now backtraces correctly when stopped at the first instruction of an inlined function. Earlier versions would sometimes encounter internal errors in this situation.
Improved diagnostics for region overflow. The linker will now give more helpful diagnostics when the object files being linked are too big for one of the memory regions defined in the linker script.
Debugging of inlined functions. GDB now supports inlined functions. GDB can include inlined functions in the stack trace; display inlined functions' arguments and local variables; and step into, over, and out of inlined functions.
Debugger access to AltiVec and SPE registers. GDB can display AltiVec and SPE registers when using gdbserver on configurations with these auxiliary processors.
GCC version 4.2.
Sourcery G++ Lite for Power GNU/Linux 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
.
Debugger access to out-of-bounds memory.
GDB turns on inaccessible-by-default
by
default, disallowing access to memory outside the regions
specified in a board configulation.
Binutils update. The binutils package has been updated from version 2.17 to the pre-2.18 FSF trunk. This is a significant update with many improvements and bug fixes.
Changes to the assembler (as) include:
New linker (ld) features include:
--default-script
has been added to give more precise control over linker script
processing.
-Bsymbolic-functions
,
--dynamic-list
,
--dynamic-list-cpp-new
, and
--dynamic-list-data
to control symbols
that should be dynamically linked.
--print-gc-sections
option lists
sections removed by garbage collection.
Other changes include:
--extract-symbol
option to extract only
symbol table information from the input file.
For more information, refer to the manuals for the individual
utilities, and the binutils web site at
http://www.gnu.org/software/binutils/
.
GDB update. The included version of GDB has been updated to 6.6.50.20070620. This update includes numerous bug fixes.
Segmentation fault in memset
.
A segmentation fault in memset
has been
fixed. The problem occurs on some 8xx series PowerPC CPUs
when executing a dcbz
instruction, because 8xx
processors are unable to report page faults correctly in
this case. The problematic dcbz
instruction is
avoided on affected processors.
Assembler skipping \
characters.
A bug is fixed where the assembler would skip \
characters when they appeared at certain positions in the
input file. This bug primarily affected assembler macros.
Spurious compiler warnings eliminated.
GCC no longer emits warnings when linker-specific
command-line options are provided in combination with modes
that do not perform linking, such as with the
-c
flag.
Forced alignment of array variables.
A new option -falign-arrays
has been added to
the compiler. Specifying this option sets the minimum alignment
for array variables to be the largest power of two less than or
equal to their total storage size, or the biggest alignment used
on the machine, whichever is smaller. This option may be helpful
when compiling legacy code that uses type punning on arrays that
does not strictly conform to the C standard.
E500 floating-point bug fix. Some bugs affecting comparisons of NaNs on E500 processors have been fixed.
Software floating-point bug fix. A bug affecting conversion of wider floating-point types to subnormal float values when using software floating point has been fixed.
Linux Host Requirements. The lowest version of Linux that is required for the Linux hosted toolchain is now RedHat 7.3. Previous versions required RedHat 8.0 or later.
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.
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.
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.
No significant changes. There are no significant changes for Power GNU/Linux in this release.
Improved handling of Windows paths in GDB. GDB now properly recognizes the names of source files that were passed to the compiler using an absolute path on Windows. You may refer to the file either by its base name (without any leading directory components), by the exact path passed to the compiler, or by its absolute path.