+#elif defined(__arm__)
+ case R_ARM_PC24:
+ case R_ARM_PLT32:
+ /* find the plt entry and initialize it if necessary */
+ assert(isym != NULL);
+ pe = (struct arm_plt_entry*) &isym->pltent;
+ if (! pe->inited) {
+ ip = (unsigned long *) (ifile->plt->contents + pe->offset);
+ ip[0] = 0xe51ff004; /* ldr pc,[pc,#-4] */
+ ip[1] = v; /* sym@ */
+ pe->inited = 1;
+ }
+
+ /* relative distance to target */
+ v -= dot;
+ /* if the target is too far away.... */
+ if ((int)v < -0x02000000 || (int)v >= 0x02000000) {
+ /* go via the plt */
+ v = plt + pe->offset - dot;
+ }
+ if (v & 3)
+ ret = obj_reloc_dangerous;
+
+ /* Convert to words. */
+ v >>= 2;
+
+ /* merge the offset into the instruction. */
+ *loc = (*loc & ~0x00ffffff) | ((v + *loc) & 0x00ffffff);
+ break;
+#elif defined(__i386__)