val = (intptr_t)GetSymbol(Sym, NULL);
*ptr = val + addend;
break;
+ case R_ARM_COPY: {
+ size_t size;
+ void *src = GetSymbol(Sym, &size);
+ DEBUGS(" elf_doRelocate_arm: R_ARM_COPY (%p, %p, %i)", ptr, src, size);
+ memcpy(ptr, src, size);
+ break; }
default:
SysDebug("elf_doRelocate_arm: Unknown Relocation, %i", type);
break;
}
}
- DEBUGS("Elf64Relocate: Relocations done, return %p", (void *)(hdr->e_entry + baseDiff));
- return (void *)(uintptr_t)(hdr->e_entry + baseDiff);
+ {
+ void *ret = (void *)(uintptr_t)(hdr->e_entry + baseDiff);
+ DEBUGS("Elf64Relocate: Relocations done, return %p", ret);
+ return ret;
+ }
}
int Elf64GetSymbol(void *Base, const char *Name, void **Ret, size_t *Size)