This is the mail archive of the libc-alpha@cygnus.com 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]

Re: Damaged PPC_REL24 handling


On Fri, Nov 13, 1998 at 03:36:39PM -0800, Ulrich Drepper wrote:
> Daniel Jacobowitz <drow+@cs.cmu.edu> writes:
> 
> > Something is wrong with the handling of R_PPC_REL24 relocations.  This
> > error keeps getting triggered:
> > 
> >     case R_PPC_REL24:
> >       {
> >         Elf32_Sword delta = finaladdr - (Elf32_Word) (char *) reloc_addr;
> >         if (delta << 6 >> 6 != delta)
> 
> Try replacing this with
> 
> 	  if (delta & ~0x3fffffc)

This matches the realization I've come to over the past hour of
pounding on it, which is that whether or not the if was correctly
signed - which I'm inclined to think it wasn't - the relocation is
still appearing as out of range.

The numbers for my problem case (this appeared while building mozilla;
I've also seen it with an 800K .so generated by mod_perl):

delta == 0xd112db70
finaladdr == 0x017a2664
reloc_addr == 0x30674af4

Because it is being relocated downwards, finaladdr - relocaddr is
negative; a negative delta, signed or not, certainly has its high bit
set.

I don't quite follow the logic of this segment, but something seems
wrong with the logic of the relocation handling.  Either that, or
binutils is not generating correct code for REL24 (and REL32?).

Dan


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