This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.20-394-g0d4ba8b


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  0d4ba8be9cd4cebcc2418c72c22a12fc9baf2c85 (commit)
       via  6d4188dd7fe4fd7b9aeac91eab4e3c259538106d (commit)
      from  804c54f7b0d37d7d3c673724842135b220ba9c1c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0d4ba8be9cd4cebcc2418c72c22a12fc9baf2c85

commit 0d4ba8be9cd4cebcc2418c72c22a12fc9baf2c85
Author: David S. Miller <davem@davemloft.net>
Date:   Fri Dec 19 13:34:30 2014 -0800

    Fix soft-fp build warning on sparc about strict aliasing.
    
    	* sysdeps/sparc/sparc32/soft-fp/q_neg.c (_Q_neg): Use a union to
    	access the quad as both a long double and as a series of 4 words.

diff --git a/ChangeLog b/ChangeLog
index a5f2888..3cef094 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2014-12-19  David S. Miller  <davem@davemloft.net>
 
+	* sysdeps/sparc/sparc32/soft-fp/q_neg.c (_Q_neg): Use a union to
+	access the quad as both a long double and as a series of 4 words.
+
 	* get-dynamic-info.h (elf_get_dynamic_info): Ignore -Warray-bounds for a
 	link_map->l_info array access.
 
diff --git a/sysdeps/sparc/sparc32/soft-fp/q_neg.c b/sysdeps/sparc/sparc32/soft-fp/q_neg.c
index b5049cd..5fb7e1a 100644
--- a/sysdeps/sparc/sparc32/soft-fp/q_neg.c
+++ b/sysdeps/sparc/sparc32/soft-fp/q_neg.c
@@ -24,20 +24,25 @@
 
 long double _Q_neg(const long double a)
 {
-  long double c = a;
+  union {
+    long double	ldbl;
+    UWtype	words[4];
+  } c;
+
+  c.ldbl = a;
 
 #if (__BYTE_ORDER == __BIG_ENDIAN)
-  ((UWtype *)&c)[0] ^= (((UWtype)1) << (W_TYPE_SIZE - 1));
+  c.words[0] ^= (((UWtype)1) << (W_TYPE_SIZE - 1));
 #elif (__BYTE_ORDER == __LITTLE_ENDIAN) && (W_TYPE_SIZE == 64)
-  ((UWtype *)&c)[1] ^= (((UWtype)1) << (W_TYPE_SIZE - 1));
+  c.words[1] ^= (((UWtype)1) << (W_TYPE_SIZE - 1));
 #elif (__BYTE_ORDER == __LITTLE_ENDIAN) && (W_TYPE_SIZE == 32)
-  ((UWtype *)&c)[3] ^= (((UWtype)1) << (W_TYPE_SIZE - 1));
+  c.words[3] ^= (((UWtype)1) << (W_TYPE_SIZE - 1));
 #else
   FP_DECL_Q(A); FP_DECL_Q(C);
 
   FP_UNPACK_RAW_Q(A, a);
   FP_NEG_Q(C, A);
-  FP_PACK_RAW_Q(c, C);
+  FP_PACK_RAW_Q(c.ldbl, C);
 #endif
-  return c;
+  return c.ldbl;
 }

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6d4188dd7fe4fd7b9aeac91eab4e3c259538106d

commit 6d4188dd7fe4fd7b9aeac91eab4e3c259538106d
Author: David S. Miller <davem@davemloft.net>
Date:   Fri Dec 19 13:23:40 2014 -0800

    Fix array bounds warnings in elf_get_dyanmic_info() on sparc with gcc-4.6
    
    	* get-dynamic-info.h (elf_get_dynamic_info): Ignore -Warray-bounds for a
    	link_map->l_info array access.

diff --git a/ChangeLog b/ChangeLog
index 6bd8a38..a5f2888 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-19  David S. Miller  <davem@davemloft.net>
+
+	* get-dynamic-info.h (elf_get_dynamic_info): Ignore -Warray-bounds for a
+	link_map->l_info array access.
+
 2014-12-19  Chris Metcalf  <cmetcalf@ezchip.com>
 
 	* iconvdata/tst-loading.c (TIMEOUT): Increase timeout 10 sec.
diff --git a/elf/get-dynamic-info.h b/elf/get-dynamic-info.h
index 20ccf30..3f12e2e 100644
--- a/elf/get-dynamic-info.h
+++ b/elf/get-dynamic-info.h
@@ -17,6 +17,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <assert.h>
+#include <libc-internal.h>
 
 #ifndef RESOLVE_MAP
 static
@@ -47,7 +48,15 @@ elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp)
 	info[dyn->d_tag] = dyn;
       else if (dyn->d_tag >= DT_LOPROC &&
 	       dyn->d_tag < DT_LOPROC + DT_THISPROCNUM)
-	info[dyn->d_tag - DT_LOPROC + DT_NUM] = dyn;
+	{
+	  /* This does not violate the array bounds of l->l_info, but
+	     gcc 4.6 on sparc somehow does not see this.  */
+	  DIAG_PUSH_NEEDS_COMMENT;
+	  DIAG_IGNORE_NEEDS_COMMENT (4.6,
+				     "-Warray-bounds");
+	  info[dyn->d_tag - DT_LOPROC + DT_NUM] = dyn;
+	  DIAG_POP_NEEDS_COMMENT;
+	}
       else if ((d_tag_utype) DT_VERSIONTAGIDX (dyn->d_tag) < DT_VERSIONTAGNUM)
 	info[VERSYMIDX (dyn->d_tag)] = dyn;
       else if ((d_tag_utype) DT_EXTRATAGIDX (dyn->d_tag) < DT_EXTRANUM)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                             |    8 ++++++++
 elf/get-dynamic-info.h                |   11 ++++++++++-
 sysdeps/sparc/sparc32/soft-fp/q_neg.c |   17 +++++++++++------
 3 files changed, 29 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]