- 论坛徽章:
- 0
|
- static int apply_r_mips_pc16(struct module *me, uint32_t *location, Elf32_Addr v)
- {
- int rel;
- rel = (((unsigned int)v - (unsigned int)location));
- rel >>= 2; // because the offset is in _instructions_ not bytes.
- rel -= 1; // and one instruction less due to the branch delay slot.
- if ( (rel > 32768) || (rel < -32768) ) {
- //.26 arch/mips/kernel/vpe.c
- printk(KERN_DEBUG "VPE loader: %s:"
- " relative address out of range 0x%x\n", __FUNCTION__, rel);
- return -ENOEXEC;
- }
- *location = (*location & 0xffff0000) | (rel & 0xffff);
- return 0;
- }
复制代码 |
|