This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Damaged PPC_REL24 handling
- To: Geoff Keating <geoffk@ozemail.com.au>
- Subject: Damaged PPC_REL24 handling
- From: Daniel Jacobowitz <drow+@cs.cmu.edu>
- Date: Fri, 13 Nov 1998 17:07:01 -0500
- Cc: libc-alpha@gnu.org
- Mail-Followup-To: Geoff Keating <geoffk@ozemail.com.au>, libc-alpha@gnu.org
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)
{
_dl_signal_error(0, map->l_name,
"R_PPC_REL24 relocation out of range");
}
*reloc_addr = *reloc_addr & 0xfc000003 | delta & 0x3fffffc;
}
break;
What the problem is I'm not quite sure - it could be binutils, but I
think the test is at fault. From what I can see this should be an
Elf32_Word, or cast to one for the range check. This way, if the
seventh MSB is set (within the valid range), sign extension breaks the
test. Am I misunderstanding?
Dan