Another GLIBC build error with GCC6
Steve Ellcey
sellcey@imgtec.com
Wed Jul 22 16:19:00 GMT 2015
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
More information about the Libc-alpha
mailing list