This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Fall 2017 GNU Toolchain Update
- From: Nick Clifton <nickc at redhat dot com>
- To: gcc at gcc dot gnu dot org, binutils at sourceware dot org, gdb at sourceware dot org
- Date: Fri, 27 Oct 2017 11:07:11 +0100
- Subject: Fall 2017 GNU Toolchain Update
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=nickc at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6DD4985376
Hi Guys,
A new version of GLIBC and a whole boatload of new GCC features
means that there is lots to report this time.
-------------------------------------------------------------------
GLIBC:
Version 2.26 is now out. There are loads of new features and bug
fixes in this release. Some of the highlights include:
* A per-thread cache has been added to malloc. Access to the cache
requires no locks and therefore significantly accelerates the fast
path to allocate and free small amounts of memory. Refilling an
empty cache requires locking the underlying arena. Performance
measurements show significant gains in a wide variety of user
workloads. Workloads were captured using a special instrumented
malloc and analyzed with a malloc simulator.
* Unicode 10.0.0 Support.
* The tunables feature is now enabled by default. This allows users
to tweak behavior of the GNU C Library using the GLIBC_TUNABLES
environment variable.
* New function reallocarray, which resizes an allocated block (like
realloc) to the product of two sizes, with a guaranteed clean
failure upon integer overflow in the multiplication.
For the full announcement see: https://sourceware.org/ml/libc-alpha/2017-08/msg00010.html
-------------------------------------------------------------------
GCC:
Gcc is currently in stage 1 and open for all kinds of exciting new
features. Here are some that have made it in already:
-fstd=c++2a
Enables support for the next revision of the ISO C++ standard,
tentatively planned for 2020. Support is highly experimental, and
will almost certainly in incompatible ways in future releases.
-Wsuggest-attribute=cold
Warn about functions that might be candidates for the (cold)
attribute. This is based on static detection and generally will
only warn about functions which always leads to a call to another
cold function such as wrappers of C++ throw or fatal error
reporting functions leading to abort.
-Wcast-align=strict
Warn whenever a pointer is cast such that the required alignment of
the target is increased. For example, warn if a "char *" is
cast to an "int *" regardless of the target machine.
-fstack-clash-protection
Generate code to prevent stack clash style attacks. When this
option is enabled, the compiler will only allocate one page of
stack space at a time and each page is accessed immediately after
allocation. Thus, it prevents allocations from jumping over any
stack guard page provided by the operating system.
Most targets do not fully support stack clash protection. However,
on those targets the option will protect dynamic stack allocations.
The option may also provide limited protection for static stack
allocations if the target supports the -fstack-check=specific
option.
-fsanitize=pointer-overflow
This option enables instrumentation of pointer arithmetics. If the
pointer arithmetics overflows, a run-time error is issued.
-fsanitize=builtin
This option enables instrumentation of arguments to selected
builtin functions. If an invalid value is passed to such
arguments, a run-time error is issued. E.g. passing 0 as the
argument to __builtin_ctz or __builtin_clz invokes undefined
behavior and is diagnosed by this option.
-fcf-protection==[full|branch|return|none]
Enable code instrumentation of control-flow transfers to increase
program security by checking that target addresses of control-flow
transfer instructions (such as indirect function calls, function
returns and indirect jump) are valid. This prevents diverting the
flow of control to an unexpected target. This is intended to
protect against such threats as Return-oriented Programming (ROP),
and similarly call/jmp-oriented programming (COP/JOP).
-fpatchable-function-entry=<N>[,<M>]
Generate <N> NOPs right at the beginning of each function, with the
function entry point before the <M<th NOP. If <M> is omitted, it
defaults to 0 so the function entry points to the address just at
the first NOP.
The NOP instructions reserve extra space which can be used to patch
in any desired instrumentation at run time, provided that the code
segment is writable.
For run-time identification, the starting addresses of these areas,
which correspond to their respective function entries minus <M>,
are additionally collected in the __patchable_function_entries
section of the resulting binary.
-static-pie
Produce a static position independent executable on targets that
support it. A static position independent executable is similar to
a static executable, but can be loaded at any address without a
dynamic linker. For predictable results, you must specify the
same set of options used for compilation (-fpie, -fPIE, or model
suboptions) when you specify this linker option.
There is also a new variable attribute:
nonstring
This specifies that an object or member declaration with type
array of "char" or pointer to "char" is intended to store
character arrays that do not necessarily contain a terminating NUL
character.
This is useful to avoid warnings when such an array or pointer is
used as an argument to a bounded string manipulation function such
as strncpy. For example without the attribute this code:
struct Data
{
char name [32] __attribute__ ((nonstring));
};
void f (struct Data * pd, const char * s)
{
strncpy (pd->name, s, sizeof pd->name);
}
would produce a warning about the call to strncpy not producing a
terminated string.
-------------------------------------------------------------------
Binutils:
Version 2.29.1 has been released. This is just a point release over
the original 2.29 release, but it does include some important bug
fixes, especially for x86_64 and PowerPC.
In the development sources support for the command line option "-z
globalaudit" has been added. This forces audit libraries to be run
for every dynamic object loaded by an executable - provided that the
loader supports this functionality.
Also the EXCLUDE_FILE linker script directive can now be placed
within any of the SORT_* directives, to partition files out of the
sort.
The x86_64 assembler adds support for the GFNI, VAES, VPCLMULQDQ,
AVX512_VBMI2, AVX512_VNNI, AVX512_BITALG, NOAVX512_VBMI2,
NOAVX512_VNNI, and NOAVX512_BITALG extensions to the instruction
set.
The PowerPC assembler now has support for the Freescale SPE2
instructions.
-------------------------------------------------------------------
GDB:
* GDB now supports access to the guarded-storage-control registers
and the software-based guarded-storage broadcast control registers
on IBM z14.
* On Unix systems, GDB now supports transmitting environment
variables that are to be set or unset to GDBserver. These
variables will affect the environment to be passed to the remote
inferior.
* GDB no longer assumes functions with no debug information return 'int'.
This means that GDB now refuses to call such functions unless you
tell it the function's type, by either casting the call to the
declared return type, or by casting the function to a function
pointer of the right type, and calling that:
(gdb) p getenv ("PATH")
'getenv' has unknown return type; cast the call to its declared return type
(gdb) p (char *) getenv ("PATH")
$1 = 0x7fffffffe "/usr/local/bin:/"...
Similarly, GDB no longer assumes that global variables with no
debug info have type 'int', and refuses to print the variable's
value unless you tell it the variable's type:
(gdb) p var
'var' has unknown type; cast it to its declared type
(gdb) p (float) var
$3 = 3.14
* Support for ARM and AArch64 on FreeBSD has been added.