nickclifton (nickclifton) wrote,

January 2014 GNU Toolchain Update

Hi Guys,

  It has been 2 months since my last posting so quite a few things have happened:

  * The binutils now have support for the Andes NDS32 architecture.  This means that the GCC port can now be built and tested.
  * GCC now has support for the Altera Nios II architecture.

  * The objcopy program now has an option to dump a section as raw binary data, rather than in some formatted form.  This makes the new --dump-section option the compliment of the --add-section option.

  * The linker will now produce deterministic COFF and PE binaries by default.  This means that the timestamps in the binaries are set to zero so that two runs of the linker on identical inputs will produce identical outputs.  If a timestamp is needed the new --insert-timestamp command line option can be used to request this.
  * GCC has a new warning option -Wfloat-conversion which will complain about implicit conversions that reduce the precision of a real value.

  * GCC's sanitizer feature can now be tweaked to specify exactly what sorts of behaviour are being caught:

    -fsanitize=leak enables a memory leak detector.  This option only matters for linking of executables and if neither -fsanitize=address nor -fsanitize=thread is used.  In that case it will link the executable against a library that overrides malloc and other allocator functions.  For more details see:

    -fsanitize=shift enables checking that the result of a shift operation is not undefined.  Note that what exactly is considered undefined differs slightly between C and C++, as well as between ISO C90 and C99, etc.

   -fsanitize=integer-divide-by-zero Detect integer division by zero as well as INT_MIN / -1 division.

    -fsanitize=unreachable turns the __builtin_unreachable() call into a diagnostics message call instead.

   -fsanitize=vla-bound instructs the compiler to check that the size of a variable length array is positive.  This option does not have any effect in -std=c++1y mode, as the standard requires the exception be thrown instead.

   -fsanitize=null enables pointer checking.  Particularly, the application built with this option turned on will issue an error message when it tries to dereference a NULL pointer, or if a reference (possibly an rvalue reference) is bound to a NULL pointer.

   -fsanitize=return enables return statement checking.  Programs built with this option turned on will issue an error message when the end of a non-void function is reached without actually returning a value.  This option works in C++ only.

   -fsanitize=signed-integer-overflow enables signed integer overflow checking.  It checks that the result of +, *, and both unary and binary - does not overflow in the signed arithmetics.

  * The C++ ABI requires multiple entry points for constructors and destructors: one for a base subobject, one for a complete object, and one for a virtual destructor that calls operator delete afterwards.  For a hierarchy with virtual bases, the base and complete variants are clones, which means two copies of the function.  With the new option -fdeclone-ctor-dtor option the base and complete variants are changed to be thunks that call a common implementation.  This optimization is enabled by default when -Os is specified.

  * The new -fprofile-reorder-functions command line option uses profiling data to change the order of functions in a program. This can provide enhanced performance through code locality and shorter branches.
  * The ARM port of GCC now has builtin functions for the CRC32 opcodes that are supported by some ARMv8 chips.  It also has a new command line option: -mslow-flash-data which tells gcc to assume loading data from flash is slower than fetching instructions.  Hence literal loads are minimized for better performance.

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your IP address will be recorded