This section documents Sourcery G++ Lite changes for each released revision.
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.
Support for debugging with FlashPro3. Support has been added for debugging with the Actel FlashPro3 JTAG device on Windows hosts. This works only with Actel Cortex-M1 FPGAs.
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.
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.
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.
uClibc memcpy
and
memmove
functions.
A bug that caused the uClibc implementations of
memcpy
and memmove
to return incorrect values has been fixed.
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.
iWMMXt bug fix. A GCC bug affecting code generation for iWMMXt processors has been fixed. The bug caused internal compiler errors when compiling some functions with large stack frames.
NEON coprocessor system registers.
The assembler now accepts the MVFR0
and
MVFR1
coprocessor registers in
fmrx
and fmxr
instructions.
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.
Default linker script.
GCC no longer uses the simulator linker script by default.
To avoid a link failure, you must specify a linker script
explicitly with the -T
command-line option,
or via the item on the
menu in the Sourcery G++ Lite IDE.
Thumb-2 doubleword writeback addressing modes.
An assembler bug that caused writeback addressing modes for
ldrd
and strd
to be
incorrectly encoded 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.
Calls to undefined weak symbols.
The linker now implements semantics that comply to the ARM EABI for
R_ARM_CALL
and T_ARM_THM_CALL
relocations against undefined weak symbols. These now result
in a jump to the next instruction.
Thumb-2 shift instruction aliases.
The assembler now accepts mov
with shifted
operands as an alias for Thumb-2 shift instructions.
For example mov r0, r1, lsl r2
is encoded as
lsl r0, r1, r2
.
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.
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.
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.
EABI object attribute merging. The linker now properly merges EABI object attributes into its output file.
Thumb-2 exception return instructions.
An assembler bug that caused subs pc, lr, #const
and
movs pc, lr
to be incorrectly encoded has been fixed.
Tag_ABI_PCS_wchar_t object attributes.
Objects generated with -fshort-wchar
are
now given the correct Tag_ABI_PCS_wchar_t
EABI object attribute annotations.
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.
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.
Uppercase special register names.
The assembler now accepts both uppercase and lowercase
special register names when assembling msr
and mrs
instructions for the Microcontroller
profile of the ARM Architecture.
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.
Call shortening bug fix.
GCC no longer overrides __attribute__((long_call))
on
calls to locally-defined functions when the function is weak,
or when it is in a different section from the caller.
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.
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.
ARM EABI compliance. Objects produced by Sourcery G++ Lite are now marked as ARM ELF version 5 rather than ARM ELF version 4. This reflects compliance with recent revisions of the ARM EABI. Sourcery G++ Lite still accepts objects marked with version 4.
Smaller C++ applications.
The C++ runtime library has been modified so that using
namespace-scope objects with destructors does not pull in
unnecessary support functions. Therefore, statically linked
C++ applications compiled with
-fno-exceptions
are substantially smaller.
ARMv6-M floating-point bug fix. A bug affecting conversion of wider floating-point types to subnormal float values on ARMv6-M processors has been fixed.
NEON coprocessor system registers.
The assembler now accepts the MVFR0
and
MVFR1
coprocessor registers in
fmrx
and fmxr
instructions.
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.
Thumb-2 doubleword writeback addressing modes.
An assembler bug that caused writeback addressing modes for
ldrd
and strd
to be
incorrectly encoded has been fixed.
Thumb-2 shift instruction aliases.
The assembler now accepts mov
with shifted
operands as an alias for Thumb-2 shift instructions.
For example mov r0, r1, lsl r2
is encoded as
lsl r0, r1, r2
.
EABI object attribute merging. The linker now properly merges EABI object attributes into its output file.
Thumb-2 exception return instructions.
An assembler bug that caused subs pc, lr, #const
and
movs pc, lr
to be incorrectly encoded has been fixed.
Tag_ABI_PCS_wchar_t object attributes.
Objects generated with -fshort-wchar
are
now given the correct Tag_ABI_PCS_wchar_t
EABI object attribute annotations.
Uppercase special register names.
The assembler now accepts both uppercase and lowercase
special register names when assembling msr
and mrs
instructions for the Microcontroller
profile of the ARM Architecture.
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.
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.
Crash when generating vector code.
A bug that sometimes caused the compiler to crash when invoked with
the -ftree-vectorize
option has been fixed.
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
.
Linking of non-ELF images. A linker bug that could cause a crash when linking non-ELF objects for ARM targets has been fixed.
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.
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
.
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.
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.