This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Another GLIBC build error with GCC6
- From: Paul Eggert <eggert at cs dot ucla dot edu>
- To: sellcey at imgtec dot com, Andreas Schwab <schwab at suse dot de>
- Cc: Roland McGrath <roland at hack dot frob dot com>, Jeff Law <law at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 22 Jul 2015 10:03:21 -0700
- Subject: Re: Another GLIBC build error with GCC6
- Authentication-results: sourceware.org; auth=none
- References: <1437496279 dot 19674 dot 126 dot camel at ubuntu-sellcey> <1437507995 dot 19674 dot 136 dot camel at ubuntu-sellcey> <55AEA71B dot 2020405 at redhat dot com> <1437509796 dot 19674 dot 138 dot camel at ubuntu-sellcey> <55AEB7FF dot 1000405 at redhat dot com> <1437518197 dot 19674 dot 152 dot camel at ubuntu-sellcey> <20150721224637 dot 1E0102C3B32 at topped-with-meat dot com> <55AF30A1 dot 2030402 at cs dot ucla dot edu> <1437578812 dot 19674 dot 161 dot camel at ubuntu-sellcey> <mvmzj2o9nse dot fsf at hawking dot suse dot de> <1437581957 dot 19674 dot 167 dot camel at ubuntu-sellcey> <87pp3kf942 dot fsf at igel dot home> <1437582979 dot 19674 dot 168 dot camel at ubuntu-sellcey>
Steve Ellcey wrote:
I can't seem to find it in my email, can you send it again?
One must read Andreas's messages carefully. You could try the attached
(untested) patch, which implements his suggestion.
>From 6b661c83b411fe5b020c3523ca6cbd29fc63b2b7 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Wed, 22 Jul 2015 10:00:28 -0700
Subject: [PATCH] Port DT_EXTRATAGIDX to GCC 6.
See Steve Ellcey's bug report in:
https://sourceware.org/ml/libc-alpha/2015-07/msg00690.html
* elf/elf.h (DT_EXTRATAGIDX): Simplify by rewriting it the
same way as DT_VERSIONTAGIDX. Suggested by Andreas Schwab in:
https://sourceware.org/ml/libc-alpha/2015-07/msg00702.html
---
ChangeLog | 9 +++++++++
elf/elf.h | 2 +-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 9f87cd9..988273c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2015-07-22 Paul Eggert <eggert@cs.ucla.edu>
+
+ Port DT_EXTRATAGIDX to GCC 6.
+ See Steve Ellcey's bug report in:
+ https://sourceware.org/ml/libc-alpha/2015-07/msg00690.html
+ * elf/elf.h (DT_EXTRATAGIDX): Simplify by rewriting it the
+ same way as DT_VERSIONTAGIDX. Suggested by Andreas Schwab in:
+ https://sourceware.org/ml/libc-alpha/2015-07/msg00702.html
+
2015-07-21 Paul Eggert <eggert@cs.ucla.edu>
Port the 0x7efe...feff pattern to GCC 6.
diff --git a/elf/elf.h b/elf/elf.h
index fbadda4..1d7ccc0 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -801,7 +801,7 @@ typedef struct
range. Be compatible. */
#define DT_AUXILIARY 0x7ffffffd /* Shared object to load before self */
#define DT_FILTER 0x7fffffff /* Shared object to get values from */
-#define DT_EXTRATAGIDX(tag) ((Elf32_Word)-((Elf32_Sword) (tag) <<1>>1)-1)
+#define DT_EXTRATAGIDX(tag) (DT_FILTER - (tag)) /* Reverse order! */
#define DT_EXTRANUM 3
/* Values of `d_un.d_val' in the DT_FLAGS entry. */
--
2.1.0