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


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


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