From: Greg Ungerer Date: Tue, 19 Mar 2002 02:21:30 +0000 (+0000) Subject: Fixup for ARM PLT32 relocation type, patch from David Byron X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=9d96d901f39ea64e1d6d7ab360283bcddb12f395;p=elf2flt.git Fixup for ARM PLT32 relocation type, patch from David Byron (was ). --- diff --git a/elf2flt.c b/elf2flt.c index 51e2314..5acee44 100644 --- a/elf2flt.c +++ b/elf2flt.c @@ -598,7 +598,8 @@ dump_symbols(symbols, number_of_symbols); tmp.l = *((unsigned long *) (sectionp + q->address)); hl = tmp.c[i0] | (tmp.c[i1] << 8) | (tmp.c[i2] << 16); - if ((*p)->howto->type != R_ARM_PC24) + if (((*p)->howto->type != R_ARM_PC24) && + ((*p)->howto->type != R_ARM_PLT32)) hl |= (tmp.c[i3] << 24); else if (tmp.c[i2] & 0x80) hl |= 0xff000000; /* sign extend */ @@ -606,7 +607,8 @@ dump_symbols(symbols, number_of_symbols); tmp.c[i0] = hl & 0xff; tmp.c[i1] = (hl >> 8) & 0xff; tmp.c[i2] = (hl >> 16) & 0xff; - if ((*p)->howto->type != R_ARM_PC24) + if (((*p)->howto->type != R_ARM_PC24) && + ((*p)->howto->type != R_ARM_PLT32)) tmp.c[i3] = (hl >> 24) & 0xff; if ((*p)->howto->type == R_ARM_ABS32) *((unsigned long *) (sectionp + q->address)) = htonl(hl);