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: Steve Ellcey <sellcey at imgtec dot com>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: Paul Eggert <eggert at cs dot ucla dot edu>, 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 09:19:17 -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>
- Reply-to: <sellcey at imgtec dot com>
On Wed, 2015-07-22 at 18:09 +0200, Andreas Schwab wrote:
> Steve Ellcey <sellcey@imgtec.com> writes:
>
> > This doesn't address the problem with the DT_EXTRATAGIDX macro. That is
> > the one that I am not sure how to fix.
>
> Didn't the simplified definition work?
>
> Andreas.
Do you mean my simplified version where I tried changing:
#define DT_EXTRATAGIDX(tag) ((Elf32_Word)-((Elf32_Sword) (tag) <<1>>1)-1)
into:
#define DT_EXTRATAGIDX(tag) ((Elf32_Word)-((Elf32_Sword) (tag) & 0x7fffffff)-1)
Then, no that did not work. The two macros are not equivalent because
my version just zeros out the sign bit whereas the original version
extended the sign bit into the next bit. I.e. I thought the original
was doing a logical right shift but it was doing an arithmetic right
shift so they do not give the same results.
Steve Ellcey
sellcey@imgtec.com