]> git.wh0rd.org Git - elf2flt.git/commitdiff
Fixup for ARM PLT32 relocation type, patch from David Byron
authorGreg Ungerer <gerg@snapgear.com>
Tue, 19 Mar 2002 02:21:30 +0000 (02:21 +0000)
committerGreg Ungerer <gerg@snapgear.com>
Tue, 19 Mar 2002 02:21:30 +0000 (02:21 +0000)
<dbyron@dbyron.com> (was <dbyron@coactive.com>).

elf2flt.c

index 51e23146e016fbfacf8538b384e00ba2978c6efc..5acee44241de068f2dcea596934200d4919ac6a9 100644 (file)
--- 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);