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 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


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