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


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

>From those numbers it looks to me like everything is working correctly and the 
address offset really is out of range.  You're right that a negative delta has 
its top bit set but that shouldn't be a problem here.

Try running this program and watch the results.  You might like to remember 
that 0xffffffff is a valid offset for a 24-bit reloc (-1) but 0xefffffff is 
not.

foo(signed int a)
{
  a <<= 6;
  printf("(%08x)\n", a);
  a >>= 6;
  printf("%08x\n", a);
}

main()
{
  foo(0xffffffff);
  foo(0xefffffff);
}

p.




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