On Tue, Mar 25, 2014 at 10:44:33PM +1100, Anton Blanchard wrote: > From: Rusty Russell <ru...@rustcorp.com.au> > + case R_PPC64_REL16_HA: > + /* Subtract location pointer */ > + value -= (unsigned long)location; > + value = ((value + 0x8000) >> 16); > + *((uint16_t *) location) > + = (*((uint16_t *) location) & ~0xffff) > + | (value & 0xffff);
There's not much point reading the uint16_t. *(uint16_t *) location = value; > + break; > + > + case R_PPC64_REL16_LO: > + /* Subtract location pointer */ > + value -= (unsigned long)location; > + *((uint16_t *) location) > + = (*((uint16_t *) location) & ~0xffff) > + | (value & 0xffff); and again. > + break; > + > default: > printk("%s: Unknown ADD relocation: %lu\n", > me->name, -- Alan Modra Australia Development Lab, IBM _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev