This is the mail archive of the libc-alpha@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]

Re: Another GLIBC build error with GCC6


On 07/21/2015 01:46 PM, Steve Ellcey wrote:
On Tue, 2015-07-21 at 09:31 -0700, Steve Ellcey wrote:
I just ran into this problem when compiling string/strchr in ILP32 mode
on MIPS:

To be complete, I ran into 4 problems while building glibc with the
latest top-of-tree GCC.

strchrnul.c has the same problems as strchr.c.  The definition of
DT_EXTRATAGIDX in elf/elf.h also gives a shift overflow warning and
elf/dl-dl-deps.c now gives an array out-of-bounds message.  Here is a
not fully tested, not ready patch that allowed me to do a complete
build.  I think this new definition of DT_EXTRATAGIDX would give the
same result as the old definition.  I couldn't see anything to do with
dl-deps.c except ignore the warning, maybe someone else has a better
idea.

Steve Ellcey
sellcey@imgtec.com


diff --git a/elf/dl-deps.c b/elf/dl-deps.c
index eee146a..d4c5c00 100644
--- a/elf/dl-deps.c
+++ b/elf/dl-deps.c
@@ -30,6 +30,8 @@

  #include <dl-dst.h>

+#include <libc-internal.h>
+
  /* Whether an shared object references one or more auxiliary objects
     is signaled by the AUXTAG entry in l_info.  */
  #define AUXTAG	(DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM \
@@ -226,7 +228,11 @@ _dl_map_object_deps (struct link_map *map,
  	  needed = needed_space;
  	}

+      /* Blah, blah. */
+      DIAG_PUSH_NEEDS_COMMENT;
+      DIAG_IGNORE_NEEDS_COMMENT (4.6, "-Warray-bounds");
        if (l->l_info[DT_NEEDED] || l->l_info[AUXTAG] || l->l_info[FILTERTAG])
+      DIAG_POP_NEEDS_COMMENT;
  	{
  	  const char *strtab = (const void *) D_PTR (l, l_info[DT_STRTAB]);
  	  struct openaux_args args;
Any chance I could get you to file a GCC bug for this bogus warning?

Jeff


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