Damaged PPC_REL24 handling
Philip Blundell
philb@gnu.org
Sat Nov 14 01:56:00 GMT 1998
>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.
More information about the Libc-alpha
mailing list