NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

PR/51121 CVS commit: src/lib/csu/common

The following reply was made to PR toolchain/51121; it has been noted by GNATS.

From: "Joerg Sonnenberger" <>
Subject: PR/51121 CVS commit: src/lib/csu/common
Date: Wed, 1 Jun 2016 21:21:55 +0000

 Module Name:	src
 Committed By:	joerg
 Date:		Wed Jun  1 21:21:55 UTC 2016
 Modified Files:
 	src/lib/csu/common: crtbegin.c
 Log Message:
 PR toolchain/51121:
 __CTOR_LIST__ and __CTOR_LIST_END__ are logically the same object, but
 due to the start marker, the former has to be declared as array of fixed
 size. Newer GCC versions take the liberty of exploiting the UB of
 accessing global objects past the end to unconditionally load zero
 values in that case. Two fixes are possible:
 (1) Pruning via inline assembler as done by GCC's own CRT copy.
 (2) Pruning via weak references as done for linker sets.
 Since the second part is known and required to work anyway, prefer this
 approach. In theory, the labels could be replaced completely, except
 that GNU as doesn't provide start/end symbols for sections containing
 To generate a diff of this commit:
 cvs rdiff -u -r1.9 -r1.10 src/lib/csu/common/crtbegin.c
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Home | Main Index | Thread Index | Old Index